Google Won’t Index WordPress Pages Created by Plugins – Solution

On my WordPress site I have a number of pages created by plugins: a forum, a picture gallery and a store. To use these Plugins you just place a shortcode on a single WordPress page and they do their magic to create tons of pages on that one page. The problem I’ve been having is that Google and the other search engines only see the one page that I put the shortcode on. My forum for example has hundreds of pages and is growing every day with new unique content. None of which other than the main page is being indexed by the search engines.

I just learned about Canonical Links. They are a nifty new tag created by Google to avoid duplicate content. Google is going out of their way to remove spammy duplicate content. Good for them. Used correctly they are great. The problem is that WordPress will place the same Canonical link on every page a plugin creates because WordPress sees every page as being the same as the one you put the shortcode on. Every page on my Cape Parrot forum carries the canonical link: which tells Google that every page in my forum is basically duplicate content and to only look at the main page.

My current solution is to remove the Canonical link statement from all my WordPress pages. I did so by adding the following code to my functions.php file:
remove_action('wp_head', 'rel_canonical');

In your WordPress Dashboard select Appearance/Editor then click on the functions.php file and paste the above code in. After doing so go to your site and view the source, you will see that the: <link rel='canonical' line is gone.

You still need to avoid duplicate content. Doing it on the server side with redirects is probably the better method.

This entry was posted in Servers, Websites, Wordpress, Wordpress Plugins and tagged , , , , , , , , , , . Bookmark the permalink.

25 Responses to Google Won’t Index WordPress Pages Created by Plugins – Solution

  1. Spike says:

    Thanks Craig… your solution rocks!

    Google is now indexing my mingle forum.

    If you can expand your blog post to explain, in tutorial format, what you mean by managing duplicate content from the server side with redirects would be appreciated.

    ~~ Learn how to become an attractive man at ~~

  2. Kim says:

    Thank you so much for the info on shortcodes and indexing. I was worried about this, because I use plugins for tables with information that I definitely want indexed. I’ll use your solution, but I’m also wondering: does Google ‘see’ my table data on the post where I placed my shortcode for the table? Or does it ‘see’ the data in its own separate page? Because it’s obviously best in terms of SEO to have the data in context of the post. Almost wondering if I just need to copy my data and paste it directly into the post, bypassing the shortcode method…would appreciate your view on this.

    • Craig Harris says:

      Kim, An example of this is my Cape Parrot Forum. It resides at:

      As far as WordPress is concerned it is just the one page that has the shortcode on it. While the plugin has created hundreds of forum pages WordPress puts the same: canonical link onto each one. This tells Google to only index that one page. Removing that canonical link from all the pages allows Google to see (and index) each page as we see them.

      • Kim says:

        Thank you for the response Craig. That leads me to another question: If I use a shortcode from a table plugin for a small table listing data relating to a Realtor, for example, will Google index the data in that table? And will it ‘see’ the data in context of the rest of the Realtor’s bio page, or will it ‘see’ the table as standing alone, out of context? (An example is on /agent-2 of my site.) Thanks again!

        • Craig Harris says:

          Kim: You can use the “View Source” option in your web browser to see what Google sees. Your table data does show on your page. And it also looks like your canonical link is pointing to the right place.

          • Kim says:

            Thank you, Craig. Pretty basic I guess, but I didn’t realize that. I haven’t used shortcodes much before, and it just occurred to me to wonder about this. Thanks for taking the time to explain. I appreciate it!

  3. Pingback: Ever Wonder What Google Sees When You Use a Shortcode? » Crunchy Data

  4. Hi Craig,

    I am using Mingle Forum and have had the same issue with indexing.

    Following your advice, I added the suggested code, as described. I am using All In One SEO which can be set on a page by page basis and so I have enabled canonical link creation but disabled the plugin on my forum page. Looking at my source code, it seems to have had the desired effect as the link=’canonical’ appears on all pages barring the forum. I have also added the sitemap to Google Webmaster Tools and it appears to be working as it should. However, forum urls are not yet indexed. Have I made an error, missed something or do I just need to be a little more patient?

    • Craig Harris says:

      @Matt: It sounds like you’ve done it correctly. It does take a while for the search engines to index you pages. It can take days for any pages to show up. The search engine spiders seem to focus their attention on high traffic sites. Popular forums with hundreds of posts a day can get new posts indexed in minutes. Low traffic forums with just a few posts a day can take days. Some pages may never show up.

  5. Hello!

    I have now adopted the code in the beginning on my functions.php, so it looks like this:

    <? php
    remove_action ('wp_head', 'rel_canonical');
    include_once TEMPLATEPATH. '/ functions / inkthemes-functions.php';
    if (function_exists ('optionsframework_init')) {
    / * ———————————————— ———————————– * /
    / * Theme Options Framework

    .. And so on ..

    I've also added the sitemap to Google Webmaster Tools. But Google still not index my post in the forum. What have I done wrong?

    Hope someone can help :)

    You can see my forum here:

  6. Hey Matt Alhaarth.

    Are your pages in the forum is still not indexed? Or are they indexed now?

  7. How do you do that there is for example “Thor’s Cape Parrot ..” in the page title, and there comes unique page titles for every post, after “Thor’s Cape Parrot ..”?

    Because if I write “Forum” in my site tittle, it becomes the page title on all the posts?

    Do you understand my question?

    • Craig Harris says:

      @Jonathan: I understand your question. I don’t really know the answer. I think the title format is a function of my theme. (Don’t quote me on that as I am just guessing.) I use 1024px 2.7 by Andreas Viklund.

  8. Okey, I understand.

    But I can not understand why Google not indexing me and Matt’s forum. The canonical tag is completely removed, the Sitemap of the forum is sent to Google :(

  9. Kyle says:

    Hey Jonathan,

    I’m still trying to figure this out as I type this but what I found in my circumstance is that I put that code in the functions.php, but also I had to unclick the box in All in One SEO settings that made canonical links, and I took the link to each forum category in my forums, and pasted them in the Google XML Sitemap plugin settings where it says ‘add pages’.

    Now, it’s a matter of waiting to see if I have missed any steps in the process. My site would have over 800 pages indexed instead of 50, if my site was crawled properly. Thanks Craig for getting this post up. I’m hoping it works for me.

  10. Chris W says:

    Hello Craig,

    Saw your topic and thought it was very helpful. However, I couldnt seem to do the trick that you did. As soon as I put that code into my “functions” PHP … it seem to have messed up my site. It showed error on my website… Is there a certain place in the functions php where I am supposed to put it? I really would love some feedback.

    Thank you.

    • Craig Harris says:

      I added the code right after the first line as show below (cut from my site):

      #Added to remove canonical links from pages
      remove_action('wp_head', 'rel_canonical');

      • Craig Harris says:

        I might add that as stated in the Blog post I used the built in WordPress Editor to make the changes to the themes function.php file under Templates/Theme Functions (functions.php)

  11. Vovff says:

    My Mingle Forum also NOT indexed by Google and other search engines. In index is only one page – home. My forum for over a year (

  12. Lorrie says:

    Competent and well skilled locksmith help you select the right type
    of lock ideal for your security.

  13. I conceive you have remarked some very interesting points,
    regards for the post.

Leave a Reply

Your email address will not be published. Required fields are marked *