Page not indexed in WordPress? Beware of rel=canonical issue for dynamic links

3105682577 165848b837 m Page not indexed in WordPress? Beware of rel=canonical issue for dynamic linksRecently I stumbled upon an SEO problem on a huge site that had a lot of it's pages simply disappear from Google index.

I used SEO Doctor to check all the usual suspects (robots.txt, index meta tag, even the scarcely known x-robots-noindex HTTP header) but everything seemed to be in check yet the pages were not indexed. It was starting to drive me crazy.

Then suddenly I discovered the problem.

Since WordPress 2.9 (I believe) rel canonical meta tag was introduced and added automatically for all dynamic pages.

So if you have any non-standard WordPress pages (created through a plugin or in other dynamic means) it may be possible that it they also contain rel canonical tag added by WordPress, which would prevent the particular pages from being indexed.

If that is the case solution is simple. Just add this to your theme functions.php:

remove_action('wp_head', 'rel_canonical');

Learned my lesson the hard way so you don't have to! And also the next version of SEO Doctor (1.4) will feature a warning if canonical links are detected on the page.


Please also check out ManageWP, One dashboard to manage all WordPress sites.

Related Articles:


Posted in: SEO
TAGS:, , , , , , , , , , , , , , ,
leave a comment.

Comments:

14 Comments

  1. Kompiuteriu remontas
    Jan 7th, 2012

    After yahoo backlinks disapeared seo doctor seems not working now properlly

  2. yan
    Oct 12th, 2011

    nice , i had the same issue in my wordpress at http://www.cloud-hosting.ca
    thanks for the fix. worked perfectly.

  3. Adrian
    Sep 29th, 2011

    looking here
    http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html
    and the specific example of wikia.com it sounds like it's ok to have a page with a canonical link reference pointing to itself. Which is perfect when there are mutliple domains/paths to a page, and clearly the correct one when used will create this 'loop' -but google says ok.

  4. Tadas
    Aug 30th, 2011

    Had the same problem on http://www.fixis.lt/lt/Kompiuteriu-supirkimas.html kompiuteriu supirkimas, And thanks to this tip now is everything just fine. Thank you!!

  5. Pembuatan Website
    Jul 18th, 2011

    I have problem on my WordPress said:
    Page is not indexable because This page has a canonical URL set to [http:// ..
    HTML:
    HTTP: X-Robots-Tag:noindex
    robot.txt: User-agent: *Disallow:/
    HTML:

    Link my site: http://www.pembuatanwebsitesurabaya.com.
    I have tried to follow instruction above, but, no luck. Any assistant to help?

  6. Iain
    Jun 11th, 2011

    My site - http://facebookbackgroundsandlayouts.com had this very same issue, however I believe I have fixed it now thanks to your useful advice :-)

    I will comment back when I discover if it is fixed or not, thanks!

  7. Greg
    Mar 3rd, 2011

    I never comment on site but I had to come back and say THANK YOU. I helped develop a real estate site built on wordpress. All the property pages' content was dynamic based on the url. Months had gone by and none of the properties would show up in google, yahoo,etc. I just stumbled upon your post and it fixed the issue. It was the damn canonical links!

  8. Sean
    Nov 19th, 2010

    Brilliant! Worked like a charm. Thank you, Vladimir!

  9. Clint Chancellor
    Oct 18th, 2010

    I am having an issue on a fresh install of WP 3.0.1 using a theme from REIhomesales.com. I have yet to be indexed and started googleing to find reasons why this could be and I believe this is why.

    My page http://www.fasthomebuyersa.com/our-solutions/are-you-in-foreclosure-in-san-antonio-tx/ lists a rel='canonical' href='http://www.fasthomebuyersa.com/our-solutions/are-you-in-foreclosure-in-san-antonio-tx/' which is obviously the identical url.

    So when google trys to spider this url does it in essence tell google don't bother indexing this content because it is identical to the content of the canonical url, if google goes there, they are told to go to...which is like an infinite loop?

    ???

    Clint.

    • brent
      Jun 30th, 2011

      I was wondering the same thing and would love for this to be clarified.

      otherwise, thanks for the really helpful hint

  10. Dhanush
    Oct 10th, 2010

    i cant understand what is rel.. pl simplify

  11. Ricardo
    Oct 3rd, 2010

    Hey BP I think what Vladimir is trying to say is not to de-index what has been indexed by Google but if you are facing a similar situation just make sure that WP is properly tagged on canonical attribute.

  12. Bp
    Oct 3rd, 2010

    I am having a hard time following your line of thought. If a page -any page- has the right canonical, why would it be de-indexed? It makes no sense. Google said they will strictly follow canonical metatags. I am missing something for sure.

Have your say

Your email is never published nor shared. Required fields are marked *

*
*

Subscribe without commenting

About

vladimir prelovac Vladimir Prelovac is CEO of Prelovac Media, a computer engineer by profession and an adventurer by state of mind. more +


"I would love to change the world, I just don't have the source code yet."

Services

Manage multiple WordPress sites

Built for WordPress enthusiasts, ManageWP helps you manage all your WordPress sites from one central location.

Books

WordPress Plugin Devleopment Book Read my book WordPress Plugin Development: Beginner's Guide

Published by Packt Publishing, available online through Amazon.