Nigel Carr

  • Blog
    • Week Ahead
    • News
  • Internet
    • PPC
    • SEO
      • Google Basics
      • On Page SEO
    • Social Media
      • Facebook
  • Contact Me
  • About Nigel
You are here: Home / SEO / On Page SEO / SEO Domain configuration Root vs WWW

SEO Domain configuration Root vs WWW

June 16, 2014 by Nigel Carr Leave a Comment

shoes.co.uk logo

Nerd Alert! Techie stuff ahead

As most people know I have had a nightmare with my web developers over the past five years with all of the problem they created detailed in some of the previous posts – see the links below. Only recently I discovered another little gem!

Most websites can be configured in two ways for example ours – www.shoes.co.uk and simply shoes.co.uk – without the www. It is really important to know this because of course Google does not like duplication and few people realise that these two URL’s can actually be configured differently. Of course you can tell Google which one you’d prefer and then stick to it but sometimes people will link back to the root domain and pages can start popping up with incorrect backlinks. This can be sorted by using canonical URL’s sitewide but it is good practice to put a redirect rule on the root – shoes.co.uk so that it redirects to www.shoes.co.uk – avoiding any issues.

This all sounds well and good but our bright developer put a rule in the .htaccess file 301 diverting ALL ULS’s using the root domain to the www version of the home page! So for example shoes.co.uk/mens/rockport – instead of 301’ing to www.shoes.co.uk/mens/rockport – it went to www.shoes.co.uk which is ridiculous!

The fix?

In the .htaccess file there was a rule set as follows:

RewriteCond %{HTTP_HOST} ^shoes.co.uk$
RewriteRule ^(.*)$ http://www.shoes.co.uk  [R=301,L]

By changing the end of the www domain I was able to make sure that the rule 301’s correctly as it should in the Rockport example above.

RewriteCond %{HTTP_HOST} ^shoes.co.uk$
RewriteRule ^(.*)$ http://www.shoes.co.uk/$1 [R=301,L]

A small detail I know but it was coded incorrectly and would have caused all root URL’s to divert to the home page instead of the proper www.version.

I hope this is of help to someone outthere!

Nigel

Filed Under: On Page SEO

About Nigel Carr

Founder and MD of Shoes.co.uk Ltd - I have worked in the footwear trade for more than 30 years - first as a Buyer with Barratts Shoes, then supplier with my own company Network CFD and Partnership TMC Ltd - My passions are shoes, music, internet, live music and social media but not necessarily in that order!

Categories

Twitter

Tweets by @NigelCarrUK
  • Join our mailing list

    Enter your details here to subscribe to our mailing list.

     
  • Copyright © 2022 · Metro Pro Theme on Genesis Framework · WordPress · Log in