Sitemap not loading in non-www version

#109176
  • Resolved Vikram Aruchamy
    Rank Math free

    Hello Team,

    Sitemap is loading when i use the www version of my site. https://www.askvikram.com/sitemap_index.xml

    However, its not loading with the non www version https://askvikram.com/sitemap_index.xml and not redirecting to www version either.

    It shows an empty page but source is available as seen in this link: view-source:https://askvikram.com/sitemap_index.xml

    Hence it seems that there is no problem available with source too.

    I’ve also added the rewrite rules appropriately in my nginx configuration file as said in your Knowledge base articles.

    file contents:
    ———————————————————————————————————-
    user nginx;
    worker_processes 1;

    error_log /var/log/nginx/error.log warn;
    pid /var/run/nginx.pid;

    events {
    worker_connections 1024;
    }

    http {
    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    log_format main ‘$remote_addr – $remote_user [$time_local] “$request” ‘
    ‘$status $body_bytes_sent “$http_referer” ‘
    ‘”$http_user_agent” “$http_x_forwarded_for”‘;

    access_log /var/log/nginx/access.log main;

    sendfile on;
    #tcp_nopush on;

    keepalive_timeout 65;

    #gzip on;

    include /etc/nginx/conf.d/*.conf;
    server {
    rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
    rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
    }
    }

    —————————————————————————————————-

    Could you please help for solving this.

    Regards,
    Vikram

Viewing 1 replies (of 1 total)
  • Michael Davis
    Rank Math pro

    Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    Have you redirected your non-WWW version to the WWW version? If so, this is should redirect all your URLs to the www version of your site.If you haven’t, here is a reference you can use: https://www.siteground.com/kb/how_to_redirect_nonwww_urls_to_www/

    You should also only submit only the correct version of your sitemap which should be automatic if you have verified the correct version of your site.

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Sitemap not loading in non-www version’ is closed to new replies.