main-sitemap.xsl can’t be loaded, leading to blank sitemap

#510231
  • Resolved Kevin Shenk
    Rank Math free

    I’m running RankMath on a NGINX server, and having issues with the sitemaps loading. I scoured your troubleshooting guides and added the NGINX-specific configs.

    As it turns out, the sitemaps are actually rendering, but with an opening tag like this:

    <?xml-stylesheet type="text/xsl" href="//littlecocalico.com/main-sitemap.xsl"?>

    The browser responds with:

    GET https://littlecocalico.com/main-sitemap.xsl net::ERR_ABORTED 404

    And refuses to load the page.

    I’m very confused about main-sitemap.xsl, since I can’t find it anywhere on the server. How can I fix this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • After finding a similar issue in the forum, it appears that your should be updating your default recommended config for NGINX to:

    # START Nginx Rewrites for Rank Math Sitemaps
    rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
    rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
    rewrite ^/([a-z]+)?-?sitemap\.xsl$ /index.php??xsl=$1 last;
    # END Nginx Rewrites for Rank Math Sitemaps

    Hello,

    Thank you for reaching out to us and we are glad that you are able to resolve the issue.

    Allow me to share your feedback with our developers and editor and see if this can be updated in our documentation.

    Please do not hesitate to let us know if you need our assistance with anything else.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this ticket.