Reputation: 51
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
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
Reputation: 120
As the error message says, these may be your problem:
You can allow indexing everything by robots.txt Try this code (another version of yours):
User-agent: *
Allow: /
Upvotes: 0