Possible Bug on WP Super Cache


background image

Last week a reader (thanks Vlatko) emailed me letting me know that I had two URL structures working on the blog. They were:




The same problem was happening on all posts and pages. For example, a post could be accessed via:


as well as:


This is not a good thing for SEO, because Google might get confused when deciding which is the canonical version. In fact when I went to run the diagnosis tool on Google Webmaster Central I found a bunch of duplicate title tags being reported (caused by the second URL version).

Some time later Vlatko emailed me again saying that he had found the problem: the WP Super Cache plugin. WordPress is supposed to handle the canonical URL issue automatically, but somehow once I activated the WP Super Cache plugin the index.php redirect stopped working. Vatko was having the same problem on his blog, so it might be a bug on WP Super Cache itself.

I also believe that not everyone will be affected by it. It probably has something to do with your server settings.

Either way, if you are currently using WP Super Cache I recommend that you test to see if the index.php redirect is working. Make sure to log out first, and then try to access yourblog.com/index.php. If you are not redirected to the homepage you are having the same problem.

I will email the author of the plugin about it, and if you have any insights please share them with a comment.

Browse all articles on the WordPress category or check the recommended articles for you below:

38 Responses to “Possible Bug on WP Super Cache”

  • Shahab khan

    Hey daniel tell me one thing. Suppose i’ve activated the super cache compression while my host doesn’t allow the Gzip compression on shared hosting. Then what will be the impact of this on blog performance?

  • Donncha O Caoimh

    I debugged this again this morning and found the following:

    1. The redirect was broken only when the visitor was logged in or had the WordPress Test Cookie. I presume the same applies to the comment cookies.
    2. When I removed all cookies for my site and visited the blog with an extra index.php the blog redirected me to the correct url, whether in a post or on the front page.

    Google’s bot doesn’t carry cookies with it so it will redirect and there’s nothing to worry about. Also, Google is fairly smart. index.php is a common directory index file and anyway, the new canonical meta tag will tell the bot what a page’s url is supposed to be.

    I’m not worried about this. It’s a minor problem.

  • chrischee

    Btw It happened to one of my blogs, removing “index\.php” from the list of not to be cached does help… After removing /index.php automatically redirects to / well 🙂

  • Boerne Search

    “I use Super Cache and it looks like the redirect is working correctly.” – Same here.


  • Donncha O Caoimh

    If you experience this problem (or any other, and you’ve read the readme.txt for tips and hints), go to the forum please. The comments section on a blog post (even on dailyblogtips.com) isn’t the best place in the world to debug a problem.

    Having said, download the latest version and try the new debug function. The log it generates may point towards a bug. I don’t know why this happens at all but it doesn’t happen on many blogs (when you consider the thousands of blogs running the plugin)

  • chrischee

    My few other high traffic blogs all use the wp_super_cache but I have tested the /index.php all redirects well 🙂 It’s indeed a useful plugin for high traffic site so traffic spike won’t crash your MySQL 🙂

  • Vlatko

    As @Syed Balkhi said if you clear the cache the redirection for the first time is OK. So for any page the cache is not made, then the index.php will redirect, but if there is a cache made then it won’t redirect.

  • Vlatko

    Removing index\.php from the list of files that shouldn’t be cached is not helping. I tried that few days ago.

Comments are closed.