[SMARTCRAWL] nginx sitemap 404 error

My sitemap rewrite here https://***/sitemap.xml does not generate and gives 404 error.

Default url of sitemap works correct:


During the chat, we tried to set up this rule

rewrite ^/(.*/)?sitemap.xml /wp-content/uploads/sitemap.xml last;

to nginx config file and restart the server but that does not help.

We also try a plugin conflict test, but also no results.

Could you help me with that?

Thank you

  • Adam Czajczyk
    • Support Gorilla

    Hi Bjorn

    I hope you’re well today!

    Would you please try another “variation” of rewrite? make sure that it goes inside your “server” block:

    location ~ ([^/]*)sitemap(.*).x(m|s)l$ {
    rewrite ^/sitemap.xml$ /wp-content/uploads/sitemap.xml permanent;

    and restart nginx (make also sure that all the caches on server and site are cleared, if there are any).

    Let me know if that worked for you, please.

    Best regards,


    • Bjorn
      • Site Builder, Child of Zeus

      Hi Adam

      Thanks for your help, sorry to let you know but it did’t work :slight_frown:

      I tested to add a new site to the server and on that one, it works without any redirect. (https://cammek.projectplan.se/sitemap.xml) The differs between the sites that works and the one that don’t work, are that the one that works are created on the Nginx server and the one that don’t work are cloned from an Apache server.

  • Adam Czajczyk
    • Support Gorilla

    Hi Bjorn

    Thank you for testing that and letting me know.

    In that case, I’ll need to reach out directly to our developers for help and hopefully they’ll be able to give us a hand with this.

    I have already passed the case to them and they’ll check your site (using credentials that you provided during the live chat) and investigate the issue to see what might be happening there and how to address this.

    Please keep an eye on this ticket for further information.

    Kind regards,


  • Konstantinos Xenos
    • Rubber Duck Debugger

    Hi Bjorn sorry for the late reply,

    Could you remove any custom redirects towards sitemap.xml that you may have already put in place and make a restart on your nginx ?

    Would there be a way as well that we could have access to try some settings ourselves?

    If yes you can send me the information needed privately through our contact form: https://premium.wpmudev.org/contact/#i-have-a-different-question by following this example:

    Subject: "Attn: Konstantinos Xenos"

    - Server Admin ( CPanel / Plesk )
    Login URL:

    - SSH Access
    Key-File ( and password ) if needed

    - Link back to this thread for reference
    - Any other relevant URLs -or- information regarding the issue that was not included in this thread



Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.