Possible Bug on WP Super Cache

Daniel

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:

dailyblogtips.com/

and

dailyblogtips.com/index.php

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

dailyblogtips.com/post-title/

as well as:

dailyblogtips.com/post-title/index.php

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”

  • Daniel Scocco

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

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

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

  • Tinh

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

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

  • ZXT

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

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

  • Dave

    Thanks for the heads up.

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

  • 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.
    http://www.noupe.com/spotlight/why-noupe-com-is-loading-pretty-fast.html

    Good luck with solving this issue.

  • 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

  • Young

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

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

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

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

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

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

  • Melvin

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

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

  • Vincent

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

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

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

    Regds
    Chanda

  • Wojciech

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

  • Daniel Scocco

    @Motiveless, due to different setting at server level.

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

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

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

  • 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:
    http://yoast.com/wordpress/canonical/

    It’s small, simple and works as advertised.

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

  • Robomaster

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

Comments are closed.