I want to keep the autogenerated sitemap.xml on a different server.

Will google follow 301 redirect while trying to fetch sitemap.xml?

https://example.com/sitemap.xml --301--> https://static.anotherexample.com/sitemap.xml


I am not sure if Google will follow the 301 (It probably will). However, the safer choice is to add the new link of the sitemap.xml in your robot.txt like this:

User-agent: *
Allow: /

Sitemap: http://www.example.com/sitemap.xml

You can read more about it here: https://support.google.com/webmasters/answer/6062596?hl=en

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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