1

Let's say I have a website www.example.com. Is it okay to host the sitemap.xml outside www.example.com such as https://example.cloudstorage.com/static/sitemap.xml? All the entries in the sitemap will have absolute URLs such as https://www.example.com/path/to/page.

The reason is that I will have an automated process to update my website's sitemap.xml but the process cannot cannot access files within www.example.com directly.

Will a search engine like Google or Bing allow for sitemap.xml to be hosted outside the website being indexed?

If yes, is there a SEO penalty for doing this?

2 Answers2

1

You can't do that. Google and Bing not allows your submit the external XML sitemap(not the same domain), your XML sitemap file should be access on the same domain.

you have many solutions to solve if you host sitemap on the outside of site.

  1. Add reverse-proxy on Nginx to access outside sitemap file.
 example.com/sitemap > abc.example/sitemap.xml
  1. Uses third-party tools that supports custom domain for your sitemap. like https://sitemaphub.com
Stephen Ostermiller
  • 99,822
  • 18
  • 143
  • 364
zhengchun
  • 171
  • 1
1

If you are creating a sitemap-index it looks like you can point to a domain other than the one you are using for your site - https://developers.google.com/search/docs/crawling-indexing/sitemaps/large-sitemaps