Quick Tips » The SEO Hobbyist

What is the Canonical Domain Issue?

This occurs when there isn’t a Permanent Redirect (301) found at the root level of your domain. If not configured properly, search engines will treat your domain “http://example.com” and “http://www.example.com” as two different sites. This can seriously hurt your rankings! We will use that same domain name in the code examples in this tutorial.

Why is it so Critical?

This issue gets so much attention because it’s such a simple mistake that can hurt your rankings an incredible amount. It also gets written about often because the fix is relatively simple (with the proper instruction).  Follow the instructions below to make sure you get the “Full Credit” from every search engine.

How Can I Check My Website for This Canonical Domains Problem?

The easiest way to test if your site has this issue is to run it through one the following analyzers.

They both will tell you very clearly if there are any canonical domain erros, as well as provide you other information about your domain that is often over looked.

Here’s How to Fix It:

There are many ways to fix the canonical domain issue.  The first example is by using an Apache .htaccess file with the following contents. If your preferred name is http://www.example.com, then add the following to a blank text file named .htaccess, and upload it to the domain root:

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^example.com [nc]
rewriterule ^(.*)$ http://www.example.com/$1 [r=301,nc]

Conversely, If your preferred domain is http://example.com then your last two lines would be:

rewritecond %{http_host} ^www.example.com [nc]
rewriterule ^(.*)$ http://example.com/$1 [r=301,nc]

If you website is built in PHP, you can fix it with the following code snippet:

<?php
if (substr($_SERVER['HTTP_HOST'],0,3) != 'www') {
header('HTTP/1.1 301 Moved Permanently');
header('Location: http://www.'.$_SERVER['HTTP_HOST']
.$_SERVER['REQUEST_URI']);
}
?>

And Finally, a 301 Canonical redirect using ASP:

<%
If InStr(Request.ServerVariables("SERVER_NAME"),"www") = 0 Then
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www."
& Request.ServerVariables("HTTP_HOST")
& Request.ServerVariables("SCRIPT_NAME")
End if
%>

How Can I Verify The Fix?

After making the above changes, re-run your website through the analysers that I linked previously. The fix should take effect immediately.

I hope found this article informative. If you have any questions or comments, feel free to enter them below.

<p style=”padding-left: 30px;”>r

There is no better time to focus on your new blog or website’s search engine optimization than during it’s initial setup. Being an SEO and Web Development hobbyist, I find myself creating new blogs and sites all the time and have become very efficient at it. You’ve already spent all that time registering a domain name and choosing a web host. You’ve probably already decided, installed, and configured your CMS. You are finally happy with how your initial page looks and now what should you do?

All the following tips are free and easy to implement. Here’s my New Blog/Website SEO Checklist:

1) MAKE A BACKUP

Even the best web-hosts can not be trusted. When I was first starting in web development, I bought hosting from a company who promised me redundant 2 weeks of backups. What I didn’t know was that really translated to 1 backup every two weeks. My website crashed on a Sunday, which turned out to be the same day it was backed up. Come Monday morning, the only backup of my site was a few hour old copy of my crashed site. I had to learn the lesson the hard way, you should not! I will soon be writing a blog post specifically on how to keep your blog’s information safe!

2) Start your Web Tracking With Google Analytics

Everyone has to start somewhere. It is imperative to track your stats from the very beginning. Not only can it be a great motivational tool when you see increases in traffic – but also provides INVALUABLE information about your site’s audience. Even if you only scratch the surface with this tool, you can track your daily visitor count and then get comparisons to the previous month. If you love statistics like myself, you can go crazy with it. For example:

  1. What Time of Day Do I Get the Most Hits?
  2. Who are my Top Referrers?
  3. How Many Hits Am I Getting From International Users?
  4. Is Anyone Reading my RSS Feed?
  5. What Percent of my Daily Users are Visiting for the First Time?
  6. How am I Doing Compared To Sites Similar to Mine?
  7. Whats My Most Viewed Content?
  8. How Long Does an Average User Spend on my Site?
  9. How Many Pages Does Each Person View?
  10. If you really want to get crazy, you can find information like What Version of Flash Player are Most of my Visitors Using?

I could go on for ever about the benefits of Google Analytics, plus it’s free. Use it and thank me later.

3) Submit Your Website to the Following Search Engine’s Webmaster Tools:

Google Webmaster Tools
Yahoo Site Explorer
Bings Webmaster Tools

Not only will submitting your URL to these services help get you indexed faster, but they also provide useful statistics and information about how your site appears in their search engine rankings. I use Google’s Web Tools the most because they have the best stats on number of pages indexed and page load times. They also display the number of pages indexed in your sitemap right on the dashboard. I love seeing this number increase every time I log in. Another good use for Google’s Webmaster Tools is that they make it easy to find 404 errors (Pages Not Found) and have great keyword analysis.

That being said I think that Yahoo’s Site Explorer has more in-depth and accurate back-link tracking (sites that link to you) and updates at a faster rate than Google’s. I normally only submit my info to Bing’s Webmaster tools for the chance at faster indexing, but they have some great new features as well. For example, their tools are the only ones who give page ranks on your inbound and outbound links. It can be very helpful to know the search engine authority and popularity of your link partners. If possible I’d make sure to check back weekly on Google’s tools, and monthly on the other two to monitor your progress.

4) Run it through Website Grader

I realize that this is a cheesy/novice tool. But, if you can ignore that – there is no better way to get a baseline/benchmark (to improve upon!). They also check to make sure you haven’t made any classic SEO mistakes (like canonical domains).

5) Do Some House Keeping

These are the types of tips that are small and you should normally only have to do once.

Take care of the little things:

  1. Make Sure All Your Images Have ALT Text – Check this post for Top 5 Ways To Dramatically Increase Google Image Search Traffic.
  2. Define Targeted Categories and Tags For Posts/Pages – Having your targeted keywords in the URL is always a bonus.
  3. Remove Date Information From Permlinks – Having text like “2007/11/04″ in your URLs only increases the length and can make your content seem out of date and inadequate after a few months when that might not be the case.
  4. Add Meta Data to Your Headers – I’m aware this is mostly useless, but it only takes a minute and can’t hurt.
  5. Validate your HTML http://validator.w3.org/ – the fewer errors in your HTML the more search engine friendly it will be.

One last tip, after making all these changes be sure to MAKE ANOTHER BACKUP – Both Full File System Database!

Check back soon for my next scheduled articles:

  • 5 Essential SEO WordPress Plugins
  • 5 Firefox Plugins for SEO and Web Development
  • Best Google Adsense Alternatives
  • How to Keep Your Blog Secure

I came across this tip today that is as simple as it is powerful.

Preface your Google Search with “allintitle:” followed by your target keywords.

For example if was trying to find this blogs competition, I would Google “allintitle: seo blogs”

Obviously I need to do some work! It will not only give you an idea of how many competitors you have for your keywords, but also gives you the highest ranking ones.

This is officially the most basic and beginner post that will ever be made on this blog.

Submit Your Website To Google
Submit Your Website To Yahoo
Submit Your Website To Bing