• 0

301 Redirects and .htaccess


Question

Hi,

I'm having a bit of a brain fart and struggling to see the problem, so i was hoping somebody here could help.

I have the following .htaccess file contents where <example> is the name of my website replaced with example. I own the .com, .net, .co.uk and .eu suffices of example and theexample sites.

RewriteEngine On

RewriteCond %{HTTP_HOST} ^www.example.com$ [OR]

RewriteCond %{HTTP_HOST} ^theexample.com$ [OR]

RewriteCond %{HTTP_HOST} ^www.theexample.com$ [OR]

RewriteCond %{HTTP_HOST} ^theexample.co.uk$ [OR]

RewriteCond %{HTTP_HOST} ^www.theexample.co.uk$ [OR]

RewriteCond %{HTTP_HOST} ^theexample.eu$ [OR]

RewriteCond %{HTTP_HOST} ^www.theexample.eu$ [OR]

RewriteCond %{HTTP_HOST} ^theexample.net$ [OR]

RewriteCond %{HTTP_HOST} ^www.theexample.net$ [OR]

RewriteCond %{HTTP_HOST} ^example.co.uk$ [OR]

RewriteCond %{HTTP_HOST} ^www.example.co.uk$ [OR]

RewriteCond %{HTTP_HOST} ^example.eu$ [OR]

RewriteCond %{HTTP_HOST} ^www.example.eu$ [OR]

RewriteCond %{HTTP_HOST} ^example.net$ [OR]

RewriteCond %{HTTP_HOST} ^www.example.net$ [OR]

RewriteRule ^/?$ "http\:\/\/example\.com" [R=301,L]

IndexIgnore *

The problem is that under Google webmaster tools i have my site as www.example.com and under "Links to your site" i see example.com which i wouldn't expect if i have a 301 redirect correct.

In addition, and to confuse things further, websitegrader.com throws up a warning as follows:-

Permanent Redirect Not Found

Search engines may think www.example.com and example.com are two different sites.You should set up a permanent redirect (technically called a "301 redirect") between these sites. Once you do that, you will get full search engine credit for your work on these sites.

So its almost as if theres a funny with my 301 redirects, i just cant see it.

Could it be because in google webmaster tools i have www.example.com as my site instead of example.com (and if so which one should i change) or have i screwed up somewhere in my redirects above?

Thanks

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.