One SEO professional asked John Mueller in a recent hangout about sitemaps.
They have a huge page with millions of URLs – right now they are currently renovating the sitemaps on the site. Their IT team is thinking about storing the new sitemap files in their cloud service.
This means for example: example.com/sitemaps will be moved to cloud.com/sitemaps.
And they were wondering: is this a problem if they store the sitemaps in the cloud?
Should they also create a permanent redirect for the old URL for this example.com/sitemap, or how should they plan the move?
John explained that absolutely, it’s possible to host a sitemap file somewhere else. There are two ways that you can do this.
The first one is if you have both of those domains verified in Search Console, then this works.
The other way is if you submit it with the robots.txt file, where you specify sitemap: then the URL of the sitemap, that can also go to a different domain.
If you have a separate server where you’re creating sitemap files, or if you have some type of a staging setup, where it crawls and checks the files and then creates a sitemap file somewhere else, this would work.
John says redirecting the old sitemap file to the new location, just to be clean, also works.
But, even if you just delete the old sitemap URL, you want to make sure that you submit the new one properly in Google Search Console.
This happens at approximately the 46:15 mark in the video.