Forum Moderators: Robert Charlton & goodroi
Common Mistakes With rel=canonical
Including a rel=canonical link in your webpage is a strong hint to search engines your preferred version to index among duplicate pages on the web. It’s supported by several search engines, including Yahoo!, Bing, and Google. The rel=canonical link consolidates indexing properties from the duplicates, like their inbound links, as well as specifies which URL you’d like displayed in search results. However, rel=canonical can be a bit tricky because it’s not very obvious when there’s a misconfiguration.Common Mistakes With rel=canonical [googlewebmastercentral.blogspot.co.uk]
We recommend the following best practices for using rel=canonical:
A large portion of the duplicate page’s content should be present on the canonical version.
One test is to imagine you don’t understand the language of the content—if you placed the duplicate side-by-side with the canonical, does a very large percentage of the words of the duplicate page appear on the canonical page? If you need to speak the language to understand that the pages are similar; for example, if they’re only topically similar but not extremely close in exact words, the canonical designation might be disregarded by search engines.
Double-check that your rel=canonical target exists (it’s not an error or “soft 404”) Verify the rel=canonical target doesn’t contain a noindex robots meta tag Make sure you’d prefer the rel=canonical URL to be displayed in search results (rather than the duplicate URL) Include the rel=canonical link in either the <head> of the page or the HTTP header Specify no more than one rel=canonical for a page. When more than one is specified, all rel=canonicals will be ignored.
[edited by: engine at 2:33 pm (utc) on Apr 10, 2013]
[edit reason] example.com [/edit]
http://www.example.com/subdirectory/
and
http://www.example.com/subdirectory
I think the 301 is applied when you forget to add the trailing forward slash, most browsers demonstrate it if you try it without the /
If lucy24 is around soon she'll probably lay down some technical reasons and advice.
http://www.example.com/subdirectory/
and
http://www.example.com/subdirectory
Obviously this is meaningless in the case of index.html pages, because it's the same physical file. Same goes for some other canonical problems, like static html pages with garbage attached to the URL. You can only say "rel=canonical" if you don't mind having a page link to itself. (As a user, I find this seriously annoying and confusing. "Wasn't I here already?")
You can only say "rel=canonical" if you don't mind having a page link to itself.
Last week Google, Yahoo, and Microsoft announced support for a new link element to clean up duplicate urls on sites. The syntax is pretty simple: An ugly url such as http://www.example.com/page.html?sid=asdf314159265 can specify in the HEAD part of the document the following:
<link rel="canonical" href="http://example.com/page.html"/>
That tells search engines that the preferred location of this url (the “canonical” location, in search engine speak) is http://example.com/page.html instead of http://www.example.com/page.html?sid=asdf314159265 .
Dave, it’s totally fine for the preferred version of the page to point back to itself. I’d recommend using absolute urls just to prevent any potential problems from popping up, but that should be no problem at all.
Not sure what you mean by this.The effect can be seen (demonstrated) using most browsers; the server does the redirect but the browser shows it visually. Only said "most" because I believe one of the browsers might leave it off visually if you do
Servers redirect, not browsers.
you can serve it in the header.was news to me, don't know why I didn't take notice to that before, might be making a change soon to see if there's a difference afterward.
...don't know if you'd canonicalize index.html to "/" since that alone is index, no matter what you name the index page - hope that's phrased right for everyone ...does not compute....
[edited by: TheOptimizationIdiot at 8:50 pm (utc) on Apr 10, 2013]
Where did you get that idea?
don't know if you'd canonicalize index.html to "/" since that alone is index, no matter what you name the index page - hope that's phrased right for everyone ...does not compute....
note that to use this option, you'll need to be able to configure your server
Adding rel="canonical" to the head section of a page is useful for HTML content, but it can't be used for PDFs and other file types indexed by Google Web Search. In these cases
canonical is one thing. rel is another.
you might benefit from using "rel='canonical'" on your internal links.
Doesn't that seem to imply that the http header is only relevant for non-page documents?
And how many versions of a pdf have you got, anyway?
Mistake 1: rel=canonical to the first page of a paginated series