I had a similar issue:
- My website is:
mywebsite.example.com
- My sitemap and sitemap index files are generated and uploaded every night on
cdn.example.com/sitemap
I couldn't add my sitemap index file cdn.example.com/sitemap/sitemap.xml
in the Google Search Console tool.
So I added this in my website Nginx configuration:
# Nginx configuration for mywebsite.example.com
location /sitemap.xml {
set $backend https://cdn.example.com/sitemap/sitemap.xml;
proxy_pass $backend;
proxy_ssl_server_name on;
}
To get my sitemap index file accessible on mywebsite.example.com/sitemap.xml
. I didn't redirect the sitemap files (because I want to keep it simple and don't use rewrite rules if I can), so only my sitemap index is accessible on my website domain. My sitemap index file looks like this:
<!-- mywebsite.example.com/sitemap.xml -->
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://cdn.example.com/sitemap/sitemap-item-1.xml</loc>
<lastmod>2022-02-24</lastmod>
</sitemap>
<!-- ... -->
</sitemapindex>
It seems to work in the Search Console: my URLs were discovered. But I don't see the sitemap files in the UI, probably because of the different domain.
I sent a comment to Google with a screenshot, I'll post an update if I get a response.

TLDR: If you use a sitemap index file, it seems that you don't need to add your sitemap files in your website domain, only the sitemap index file.
Edit 2023-04-04 This does not work anymore, I have an error now in the search console.
Now the documentation says:
Your sitemap includes some URLs that are at a higher level or different domain than the sitemap file.
Different domain: Check that the URLs all begin with the same domain as your sitemap location.
/my-site/sitemap.xml
? External sitemaps are supposedly supported, but I've never seen anybody actually get them to work.