Get sitemap.xml from canonical domain with redirect to subdomain


Hi everyone! I just started with my Ghost Blog ( and almost finished the whole setup. I am using the newest Ghost version (2.0.0). The final step I want to do is to submit the sitemap.xml to Google Search Console. I wanted to redirect every call to, which is why I am using a redirect in the nginx configuration files ($ and $ Here is the com.conf - file as an example:

server {
listen 80;
listen [::]:80;

root /var/www/ghost/system/nginx-root;

location / {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $http_host;
    return 301;

location ~ /.well-known {
    allow all;

Now when I am trying to access it immediately redirects to but of course, there is none configured. I already tried to clear my cache as suggested in another thread. Also, I tried to temporarily remove those redirects from the canonical domain to access sitemap.xml but as well without success.

Do you have any ideas on how to proceed? Is it possible to redirect the sitemap.xml as well?
Thanks in advance.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.