3

I have an AJAX call on my site that does a POST and returns data. Googlebot is crawling these URLs but it is attempting to use a GET method rather than a POST. This is causing hundreds of 404 error messages appearing in Google Search Console.

Is there a best practice for this? Should I made the method HTTP GET AND POST to remedy these 404 errors?

5
  • Why do you think you need to "remedy 404 errors?" Not all errors need to be fixed. Sometimes an error is the expected behavior of a website. Jul 19, 2016 at 13:14
  • I am getting a notification about the 404 error. I know I will get 404 errors, but 200 last night? Why does Google think there is a GET verb on that? Yes they are sending querystring paratmers.
    – Mike Flynn
    Jul 19, 2016 at 15:20
  • Can you click on the error alert and see where Google is getting the URL? It is possible that there are links to the form either on your site, or another. Googlebot may also just be trying to crawl your forms. Jul 19, 2016 at 15:44
  • Of course they are trying to crawl my ajax request, but they are sending a GET and not a POST, therefore getting a 404. I am asking should I make this URL accept both verbs and not cause any issues with SEO.
    – Mike Flynn
    Jul 19, 2016 at 15:46
  • Maybe it would be more appropriate for your server to respond with a 405 Method Not Allowed rather than a 404? How is Google finding these URLs?
    – MrWhite
    Jul 19, 2016 at 23:28

2 Answers 2

3

Googlebot only performs POST requests under very limited circumstances where it is believed by the Googlebot that it is safe and appropriate. Google takes precautions to avoid performing tasks on a site that could result in executing an unintended user action and Google making POST requests is for crawling purposes only to index what the end user would see.

Google states in its webmasters blog that to make your site better for crawling remember that Google prefers GET for fetching requests unless there is a very specific reason to use POST.

A good rule of thumb to follow is...

  • A GET request is used to get data from the server.
  • A POST request is used for modifying data on the server
0

GET requests could be seen as unique url. So any bot can access get data more quickly as unique url and judge contents.

You can also cross verify all GET ajax calls againsts request url and desired format.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.