WP Remix
30
May

Recently I have been trying to help someone set up a redirect from the non-www version of their site to the www version.  So, when someone types in:

http://domain-name.com

it will automatically resolve to

http://www.domain-name.com

In my SEO training, we were taught that this is an important task in SEO.  It is actually possible that the two domains above could be two entirely different sites, with entirely different content.  Of course, in most cases, both will contain the same information, because they are the same site.

For this reason, the search engines don’t automatically assume that both the ‘www’ and ‘non-www’ version of a domain are one and the same - this is why it’s important to tell the search engines which domain you prefer through using the .htaccess file.

Using .htaccess to Redirect

.htaccess is a simple file you would upload in the root directory of your site.  You create the file in a text editor like Notepad or TextEdit, and add the following code:

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

This will ensure that if you type in ‘domain.com’, it will automatically redirect your visitor to the www version on your site.  This is not only helpful for visitors, but will signal to the search engines which version of your domain you want your ‘link juice’ going to.

*Note: this will only work if your host works with Linux servers with Apache mod-rewrite. If you try the above and it’s not working, ask your host if it is possible.

Is Redirecting Using .htaccess Necessary for SEO?

As I mentioned earlier, I have always heard that this is very important for SEO (it’s often referred to as canonicalization). I list this as one of the top ’secrets’ in my e-book, and since it’s such an easy and quick one to do, many people start off with it.

This gal I was trying to help was having trouble getting it to work with her site.  She contacted her web host, who also tried, and couldn’t get it to work.  She then sent me her FTP info and I attempted to get it to work on her site as well - no cigar.

Finally, I think in exasperation, her web host emails me to say that he strongly disagrees that this is a necessary or even particularly beneficial task for SEO (he went so far as to start a discussion over at Google Webmaster about it…apparently I am a ’spreader of misinformation’).

My typical response to such accusations is to double check my facts…after all, if I really am wrong about something, of course I will want to know that so I can change my view.  It is conceivable that there has been a change in the SEO world that I am not aware of…yes, even I am prone to such human errors ;)

The Facts about 301 Redirect for SEO

I asked SEOMoz, leaders in the SEO industry if choosing a version to redirect to is still necessary for SEO. Their response is that it IS still important, and it IS industry best practice to do so:

“As regards canonicalisation - it’s definitely still best practice to redirect it. While google is pretty damn smart at picking it up these days it’s still not clear whether it completely resolves it (i.e. passes pagerank across if links are split) or if it only displays one version (but you still lose some links). Either way, I think it’s still best practice and makes things as easy as possible for Google to crawl your site. This is especially true if you have multiple different subdomains, e.g. blog. www1. forum. etc etc”

And Matt Cutt’s view on this on his blog:

“Suppose you want your default url to be http://www.example.com/ . You can make your webserver so that if someone requests http://example.com/, it does a 301 (permanent) redirect to http://www.example.com/ . That helps Google know which url you prefer to be canonical. Adding a 301 redirect can be an especially good idea if your site changes often (e.g. dynamic content, a blog, etc.).”

And the ‘best answer’ on the post I mentioned above:

Penalize? no. [edited to add, in my e-book I don't say anything about a penalty for this...only that pagerank may be diluted*] They’ve never said that, there are benefits however to having one page show up as one page only and not with multiple versions.  So much in fact Google has devoted considerable resources to help you help them, so I sure wouldn’t just blow it off and say it isn’t important.  There are still people linking to http://www.example.com/index.html for their home link, so they can never “penalize” people for not having a clue.”

*Dilution of Pagerank:

If you have half of your inbound links pointing to http://example.com, and half pointing to http://www.example.com, you may be diminishing your link popularity, and therefore your pagerank.  Telling the search engines that one version (the www, or non-www version, doesn’t matter which), is your primary domain, will ensure that all your valuable incoming links are being ‘counted’ towards the same domain and providing the greatest SEO benefit to your site.

The Short Answer

The short answer is YES! It’s still important to choose a version and stick with it.  Make sure when you link internally you are consistent, using either http://example.com, or http://www.example.com.  In your Google Webmaster account, indicate which version is your main one (I believe it’s under ‘preferences’).  Finally, be sure to redirect to the version you’ve chosen, using a 301 redirect in your .htaccess file.

Hope this helps someone!


Category : SEO Tips

Trackbacks & Pingbacks


Comments

JaneRadriges June 13, 2009

Hi, very nice post. I have been wonder’n bout this issue,so thanks for posting

Michelle Lamar June 16, 2009

This is very great—-but where do I put this code in a Wordpress blog? Sorry but I am just techie enough to be dangerous!

admin June 16, 2009

Hi Michelle! You should be able to add or edit your .htaccess file through your web host (there should be a section called something like ‘file manager’), or else through any other FTP client (like Filezilla). I hope that makes sense!

A couple of weeks ago I noticed that my page rank dropped a point. I couldn’t figure out why. I then read this tip in your SEO Secrets and got my web programmer correct the issue. Immediately my page rank went up a point. Thanks!!!

admin June 26, 2009

That’s so great!!

Leave a comment