PeggyMe
PeggyMe

Reputation: 51

can't submit sitemap to Google webmaster tools

I’m having trouble submitting a sitemap to Google webmaster tools. This is something I have done many times and have never had any problems before. I get this error: Description: We encountered an error while trying to access your Sitemap. Please ensure your Sitemap follows our guidelines and can be accessed at the location you provided and then resubmit. Example: URL restricted by robots.txt Truly the robots text is correct, and so is the sitemap. Here is the code on the robots.txt User-agent: * Disallow:

Upvotes: 0

Views: 1282

Answers (2)

Alex Jimenez
Alex Jimenez

Reputation: 28

Try to submit your sitemap xml to Google with command line. Using curl command: curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://google.com/ping?sitemap=https://yourdomain.x0/sitemap.xml [replace uri with your http complete url/to/sitemap.xml file] Google official docs : https://support.google.com/webmasters/answer/183669

Upvotes: 0

Degauser
Degauser

Reputation: 120

As the error message says, these may be your problem:

  • Your sitemap is not created as Google wants. Try another tool.
  • Be sure that you've uploaded your sitemap to a public directory
  • Check your sitemap by typing to browser yoursite.com/sitemap.xml
  • Check your sitemap file's permissions (7-5-5 was working if I'm not wrong)

You can allow indexing everything by robots.txt Try this code (another version of yours):

User-agent: *
Allow: /

Upvotes: 0

Related Questions