October 10th, 2007
Google 405 Errors with wp-comments-post.php
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

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

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?
Continue getting our new articles by RSS or email
Related articles
Hit by Del.icio.us Front Page Effect
Top Posts of October 2007
Seen On Slash : Collecting Best Comments on Slashdot
Stop Google Toolbar Spell Check Before Publishing Blog Post
Akismet Missed Spam Comments? Recheck the Queue




Comments
RSS feed for comments on this post.1. Daniel | 11/10/07 #
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 | 11/10/07 #
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 | 11/10/07 #
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 | 11/10/07 #
test comment….
5. BloggingTom | 11/10/07 #
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 | 11/10/07 #
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 | 13/10/07 #
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 | 21/10/07 #
I experienced the same problem. But after I re-installed Windows - everything is ok.
9. QuickOnlineTips | 21/10/07 #
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. Visitor633 | 27/10/07 #
I have visited your site 698-times
11. Grant Glendinning | 23/12/07 #
roflcopter @ “Sally, design guru”. That made me roflcopter into space. Honestly, the stupidity of some people.
12. ed Burg | 8/06/08 #
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.
13. knjzgcevy ajbizc | 15/06/08 #
avorwynk jhoimdptz obhmuvslr efvtb huqcmal ztkqp jubfznv
14. 405 Error - Bloggeries Blog Forum | 6/01/08
Comment on “Google 405 Errors with wp-comments-post.php”