Possible Bug on WP Super Cache

By Daniel Scocco

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.

Monetize Your Site


38 Responses to “Possible Bug on WP Super Cache”

  • Robomaster

    Ah, good thing I made sure that plugin was setup right when I activated it. Thanks for the heads-up!

  • Dave Doolin

    Thanks for the heads up on this. I’m using Super Cache as well, but I haven’t taken the time to really dig into the settings.

    Action items:
    1. Check for duplicate title tags in google index
    2. Learn how settings one Super Cache plugin work.

  • Luciano Passuello

    One way to instruct Google what to do in in such cases of duplicate URLs is by adding the `canonical` link tag in your pages.

    For WordPress blogs, the easiest way I found to do that is by using Yoast’s Canonical Plugin:

    It’s small, simple and works as advertised.

  • Daniel Scocco

    @Luciano, I use the canonical links, but Google was indexing the dupe title tags anyway.

    In those cases I always prefer to “hard code” the solution instead of relying on the intelligence of bots :).

  • Motiveless Crime

    Just checked it on my site and was redirected to my homepage without issue. Why would it effect some sites but not others? I’m not complaining!

  • Aminul Islam Sajib

    Although I’m sure that WP Super Cache is a recommended wordpress plugin for use to speed up blog loading time, I don’t use it. I installed it on my blog but got confused after activating it. This stuff is so complex. So I left using it.

    I’m happy that this post is not going to make me anxious. 😀

  • Daniel Scocco

    @Motiveless, due to different setting at server level.

  • Wojciech

    I use Super Cache and it looks like the redirect is working correctly.

  • Chanda @ BizDharma.com

    Hey Daniel,

    When I launched my blog in June I found at times the site would load instantly and at times it will throw junk characters. This was more frequent on my mobile browser.

    When I mailed about this to guys at Doreo they said, they already use Caching at server level and I should disable WP Super cache. Post implementing this the issue got solved. I believe we need to take this aspect of Server handling cache too into consideration…


  • Gaby

    Thanks for the heads up. I use WP Super Cache but my blog’s redirects are working fine.

    I hope you manage to get the problem sorted out on your blog 🙂 I wish I had the answer for you.

  • Vincent

    I noticed this only on one of my blogs and I deactivated wp-super cache

  • Donncha

    Your blog should redirect from the index.php url to / because of the canonical code. Supercache doesn’t normally cache the index.php because there’s nothing to cache – all that’s there is a 302 redirect!

    You could try the dev version on the download page and enable the new debugging code to see what the plugin is doing.

  • Melvin

    its working properly for me.. well you could let us know what you did if its already fixed..

  • Mr. I

    I am using Super Cache and I was redirected to my homepage. I guess the problem is with some other plugin you may be using!

  • Dean @ Pro Copy Tips

    After seeing this pluging on your site (I snooped in your code to see why your site was so fast), I downloaded it and tried it. But it instantly buggered one of my sites. So I removed it and haven’t used it since.

    I’m not a tech quy, so until this plugin is fixed so there is no doubt about it, I just won’t use it. I’d love to though. It’s a great idea…something that WordPress should be doing anyway.

  • V.C

    I used to use WP Super Cache for the past few months.
    However, I don’t use it anymore because I found no benefit in this plugin.
    I don’t know what you guys think but I’m really against WP Super Cache.

  • Dana@online knowledge

    It surely do not affect my blog because i do not use wp super cache. But, thanks for let me know that there is a bug on it.

  • Sarbjit Singh

    I just tested it on my WP blog. Seems to work fine.

    Strange that it works on some and not on others. I will try and test my other blogs also.

  • Young

    I am lucky this time since my index.php URL will be redirected to the expected URL.

  • Tinh

    Hi, thanks for your great news, I have the same problem and i am using hostgator. When I type blogviet.info/index.php it was not redirected to blogviet.info it remained blogviet.info/index.php. So, how to fix it, please help. I saw a bunch of duplicate file in my Google webmaster tool too. Thanks

  • Erik (sauna en thermen)

    I have no problem at all with these redirects. It seems to be a fairly isolated issue.
    As a side node, I recently read a piece on noupe about speeding up WP with another plugin, ie W3total cache plugin.

    Good luck with solving this issue.

  • Rob Powell

    Thanks for bringing this up, I’m seeing the same problem on my site now and had no idea. Any word from Donncha about the possible bug yet?

  • Dave

    Thanks for the heads up.

  • Daniel Scocco

    @Donncha, thanks for stopping by, you beat me to emailing you 🙂 .

    The curious thing is that at the moment I deactivated the plugin the redirect started working again.

    It might not be a problem on the plugin itself, but it sure looks like it is clashing with some server configurations.

  • ZXT

    I am using this plug in too. I’ve tested it and fortunately it redirects fine.

  • Syed Balkhi

    Interestingly, if you reset the cache it will redirect you. 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.

  • Tinh

    I have just uninstalled the WP super cache and it works fine, I hope the author can fix this soon. Thanks

  • Donncha

    Daniel, did you remove “index\.php” from the list of files that shouldn’t be cached? If you install the plugin again, remove wp-content/wp-cache-config.php so you get the default config. That includes the index\.php string.

  • Donncha

    Daniel – you should probably take a look at the development version on the download page as it has a “debugging” section that will let you see what happens when you visit index.php – that would be a great help.

  • Daniel Scocco

    @Donncha, I will test removing index.php from the file list.

  • Vlatko

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

  • 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.

  • 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 🙂

  • 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)

  • Boerne Search

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


  • 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 🙂

  • 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.

  • 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?

Comments are closed.