close

Slick­Stack

February 2025 promo! Join our Discord free of charge.

Slick­Stack
Lightning-fast WordPress on Nginx

XML Sitemap 404 Nginx Config

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #27355
    Julia
    Guest

    I have a SlickStack instance and I’m using plugin “XML Sitemap Generator for Google 4.1.21” but my /sitemap.xml is a 404 page. The plugin suggested me to add below lines to nginx config:
    rewrite ^/.*-misc?\.xml$ “/index.php?xml_sitemap=params=$2” last;
    rewrite ^/.*-misc?\.xml\.gz$ “/index.php?xml_sitemap=params=$2;zip=true” last;
    rewrite ^/.*-misc?\.html$ “/index.php?xml_sitemap=params=$2;html=true” last;
    rewrite ^/.*-misc?\.html\.gz$ “/index.php?xml_sitemap=params=$2;html=true;zip=true” last;
    rewrite ^/.*-sitemap.*(?:\d\{1,4\}(?!-misc)|-misc)?\.xml$ “/index.php?xml_sitemap=params=$2” last;
    rewrite ^/.*-sitemap.*(?:\d\{1,4\}(?!-misc)|-misc)?\.xml\.gz$ “/index.php?xml_sitemap=params=$2;zip=true” last;
    rewrite ^/.*-sitemap.*(?:\d\{1,4\}(?!-misc)|-misc)?\.html$ “/index.php?xml_sitemap=params=$2;html=true” last;
    rewrite ^/.*-sitemap.*(?:\d\{1,4\}(?!-misc)|-misc)?\.html\.gz$ “/index.php?xml_sitemap=params=$2;html=true;zip=true” last;
    I’ve tried to the abode lines add on /var/www/site/production.conf in many places, restart nginx, clear all caches but no luck. Anyone knows any solution?

    #27358
    Jack
    Guest

    this one? https://wordpress.org/plugins/google-sitemap-generator/

    I use it on several SS instances without issue

    #27359
    Hannah
    Guest

    I have a SlickStack instance and I’m using plugin “XML Sitemap Generator for Google 4.1.21” but my /sitemap.xml is a 404 page

    Please try activating the HoverCraft theme or other basic type of theme, and disabling all other plugins, esp. SEO or framework type of bloated plugins

    #27395
    Gabriel
    Guest

    hey OP did you get this working yet?

    #27411
    Roy
    Guest

    Still struggling with this

    #27413
    Bruce
    Guest

    Still struggling with this

    OP you are correct… our XML sitemap just broke too using that plugin:

    https://slickstack.io/sitemap.xml

    I’m thinking maybe something is broken in their plugin because it worked fine for years, perhaps a recent version update broke it… still researching.

    #27415
    Sarah
    Guest

    Okay, I think what happened is a few months ago we were optimizing the production server block and changed the order of a few location matches. So that might have caused the try_files to get messed up for XML sitemaps!

    https://github.com/littlebizzy/slickstack/commit/8313ecc65313c162c6791e49237f01d3b83a3f43

    This should now be fixed for both sitemaps and RSS feeds too.

    Thanks for reporting, OP 😉

    JAN2025HH

    #27433
    Michelle
    Guest

    The trick from Sarah worked, thank you so much!

    #27434
    Marie
    Guest

    🥳🥳🥳

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: XML Sitemap 404 Nginx Config

Thanks to our generous sponsors for their support!