Canonical Issues !!

I am using a third party to assist in optimising my site and as part of their report they have stated the following which I do not understand, (how it happens).

I only have one page .index - does anyone know how to overcome this problem ??

here is a copy of their text.

Canonical Issues - Currently the site serves up the same content HYPERLINK “for%20http:/gymking.co.uk/” for http://gymking.co.uk/, HYPERLINK “http://www.gymking.co.uk/%20http://www.gymking.co.uk/ and for HYPERLINK “http://www.gymking.co.uk/index.htmlhttp://www.gymking.co.uk/index.html. This can be seen as duplicate content which can have a negative effect on your website. It’s best to use a htaccess file to create a permanent 301 redirect to the www. and non index URL version of your home page. Or if this cannot be implemented, a canonical tag can be used as a substitute.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

This particular thing is very low on Google’s radar, in my opinion. It’s so common that a server will respond to a request for / with /index.html that I cannot imagine that they pay it any attention at all. It is certainly true that if /foo.html and /bar.html both contain the exact same content, then only one of them will “count” in Google’s eyes. If there are hundreds of duplicate pages with unique URLs, then I imagine they would consign your entire site to that special circle of hell (the one with all the banjo players). This warning appears to be the result of an automated test that doesn’t take common sense into consideration.

Walter

On Oct 13, 2011, at 1:11 PM, Tony Farrer wrote:

Canonical Issues - Currently the site serves up the same content HYPERLINK “for%20http:/gymking.co.uk/” for http://gymking.co.uk/, HYPERLINK “http://www.gymking.co.uk/%20http://www.gymking.co.uk/ and for HYPERLINK “http://www.gymking.co.uk/index.htmlhttp://www.gymking.co.uk/index.html.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks for the quick reply , I will take yr advice and leave it , just out of interest how do you stop it from happening ??


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

There’s a couple of different ways. One is to decide that all requests to / should be redirected to /index.html. This is the actual “canonical” URL for a domain, and so you should go with this, since it’s what the Realls Smart People who invented the Web had in mind. The “convention” that you can reach any site’s main index by entering just the domain name is something that Apache did to smooth over people’s mistaken belief that this was how you got to a Web page. (Behind the scenes, Apache is doing a silent redirect to the canonical URL for the domain, and this results in two separate requests for the same page when you enter a URL without a filename.)

If you have access to your site’s main .htaccess file, then adding the following lines in there will probably do the trick:

RewriteEngine On
RewriteRule ^$ http://example.com/index.html [L,R]

The other is to do the opposite, because it “looks neater”:

RewriteEngine On
RewriteRule ^index.html$ http://example.com/ [L,R]

Now if you do these, first, obviously change the example.com part to your preferred domain name. Second, test it and make sure you don’t see a big ugly 500 error. If you do, just delete the .htaccess file (if you created it in the first place) or remove the lines you added (if you edited an existing file) to get back to a working configuration.

Walter

On Oct 13, 2011, at 1:45 PM, Tony Farrer wrote:

Thanks for the quick reply , I will take yr advice and leave it , just out of interest how do you stop it from happening ??


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options