Google Shows 405 Errors with wp-comments-post.php

By Posted 2007 Updated   BloggingSEOSite NewsWordPress

I have been tracking the web crawl diagnostics in Google webmaster tools for quite some time, and over the last few weeks have been noticing a Google 405 Error with wp-comments-post.php file in my wordpress installation.

Web Crawl is a useful webmaster site diagnostic tool that lists URLs from your site that Googlebot had trouble crawling. Googlebot found this wordpress pages had a http error.
http://www.quickonlinetips.com/archives/wp-comments-post.php

Google 405 error

Clicking on that link takes you to a blank page. I clicked the help ? and 405 Error means that “The method specified in the request is not allowed.”

Similarly while tracking the outgoing clicks via Mybloglog traffic statistics, I found that outgoing clicks were being redirected to these links also

Outgoing wordpress clicks

I failed to find where this link with the anchor text “Submit Comment” was located on my site. It seems to be somehow related to the commenting system on the blog. As far as I can tell, comments have been posting ok on the site (unless some of you have noticed a problem like blank pages or bad redirects).

I thought maybe I had tweaked the wordpress comments template and created a bug, so I replaced it with the default wordpress comments template to avoid such bugs. But the link is still getting more clicks. I ensured the latest file for wp-comments-post.php was correctly installed in WordPress 2.3 too. I have also disabled the useful “Subscribe to Comments” wordpress plugin to check if that is conflicting in some way with my wordpress installation.

Have you encountered such an error with your wordpress installation? What do you suggest I do?


30 comments on “Google Shows 405 Errors with wp-comments-post.php

  1. Daniel says:

    It’s not an error. That page accepts POST variables only, and it will return a 405 error if no POST variables are sent (GET variables aren’t accepted by it either.) – As the Google Bot is unable to send a POST request to the page it will always result in a 405 error.

    You may be interested in using PHP and strpos for the string “GoogleBot” along with the header function to tell Google that it is a 200 OK page, not a 405 Error page.

    Dan.

  2. Daniel says:

    Look at the top of the file in PHP. Here is what you will see.

    ________

    if ( ‘POST’ != $_SERVER[‘REQUEST_METHOD’] ) {
    header(‘Allow: POST’);
    header(‘HTTP/1.1 405 Method Not Allowed’);
    header(‘Content-Type: text/plain’);
    exit;
    }

    _______

    Remove that to make Google stop classing it as a 405 error.

  3. Manas says:

    That error comes when there is an incompatible plugin. Did you upgrade to WordPress 2.3 ?? If yes then there was an incompatible plugin.

  4. indyank says:

    test comment….

  5. BloggingTom says:

    wp-comments-post.php actually submits the commentform (form action). But since there are no post-variables submitted when Google directly requests that file, the webserver sends a 405 error. Other requests of that file are requests from spambots, which try to place a spam-comment on your blog.

  6. QuickOnlineTips says:

    Daniel@ – But why is this a unique problem for me only. Everyone uses wordpress…

    Manas@ – I upgraded to WP2.3 and all plugins running claim to be compatible.

  7. Daniel says:

    It’s not unique to you.

    http://danltn.com/wp-comments-post.php

    View the Server headers on that page.

    Firefox: Right-click, View Info, headers.

    It’s the same for all. :)

  8. Sally, design guru says:

    I experienced the same problem. But after I re-installed Windows – everything is ok.

  9. QuickOnlineTips says:

    Daniel – Is this issue showing in Google webmaster tools for you too? It has happened recently for me in last few weeks only.

    Sally – I wonder how reinstalling Windows will correct a wordpress issue like this, which is hosted on a server.

  10. Grant Glendinning says:

    roflcopter @ “Sally, design guru”. That made me roflcopter into space. Honestly, the stupidity of some people.

  11. ed Burg says:

    Hi, I am puzzled.

    My wp comment page has extra

    No submit button no inputs.

    If I remove it it will not submit.
    What is the purpose of this extra form if it is not submitted yet it is necessary for the proper functionality.

  12. bcek ilalama says:

    I think comment’ s php file is occured. you must analyse php code one more time but this is my idea what do you think about?

  13. Preetam Purbia says:

    hi
    i think this is similar problem.
    but cant able to integrate.

    i am also working in joomla

  14. geetha says:

    Ya, I too faced the same problem!

  15. swire says:

    I have the same problem
    no comment is submitted

  16. Hot News And Web Search says:

    I am also experiencing such a problem. But dont know how to solve. Will find out a easy and good way, Ive sought experts help

  17. papTwewlySeem says:

    fascinating and educational, but would participate in something more on this topic?

  18. Insulation Scotland says:

    Has anyone found a solution to this yet?

  19. beli says:

    Hello. I think this article is very interesting. I think that your post about Google 405 Errors with wp-comments-post.php is really good. I will try to find a solution and tell you how it show up.

  20. Alessandro Di Sciascio says:

    Are you using the “Redirection” plugin? it was causing malfunctions on my blog consistent with the one you’re mentioning.

    Try disabling the plugin if you’re running it and then try again.

  21. Boy90 says:

    Disclaimer: My queue of questions to answer is a bit backed up. ,

  22. get better body says:

    I have the same problem with external links. Does google penalizes for 405 errors?

  23. Pakiisp says:

    i have same problem in comments, 405 Erros Mathod not Allowed In Just Comments area, all plugins and my blog is workin vry well but i dun knw how to fix this problem, i have DOne Clear SQL Databse In phpMyadmin, i have Run New SQL Query for wp_coments but sill same problem.

  24. Web Oracle says:

    I thought this problem occurs when wordpress detects your comment as spammy but now I was proven wrong. Thank you for sharing.

    But why until now I still experiencing this issue? Haven’t this solved yet?

  25. Upholstery Leather says:

    Does this error still in WP 3.0?

  26. will says:

    haha design guru, why the ***** would you re install windows. also, writing because im having a similiar comments problem to you guys, and find it hilarious that people actually submit a comment just to say, “ill figure this out soon.” yea thanks alot, idiot.

  27. Asset Protection Trust guy says:

    No activity on this thread for nearly 2 years. I have the same issue with WordPress today, so I’m guessing it’s not really a problem. If the page doesn’t allow GET requests, only POST, then a 405 is the appropriate response. Nothing broken?

  28. hosting says:

    It might be a problem with specific webserver settings or security mods like mod_security or suhosin. Try to contact with your hosting provider’s helpdesk.

Leave a Reply

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




css.php