• Resolved gunsela

    (@gunsela)


    Hey there. I am using nginx and my sitemap.xml show 404 Not Found Nginx error. But if i write https://url/sitemap.xml-test i can see my sitemap. How can i fix it ? Thank you

    My nginx conf. :

    location ~* .(jpg|jpeg|gif|png|css|js|ico|xml)$ {
        access_log        off;
        log_not_found     off;
        expires           360d;
    }
    location @robots {
        return 200 "User-agent: *\nDisallow: /wp-admin/\nAllow: /wp-admin/admin-ajax.php\n";
    }
    location = /sitemap.xml {
        rewrite ^/sitemap.xml$ "/?the_seo_framework_sitemap=xml" permanent;
    }
    • This topic was modified 4 years, 5 months ago by gunsela.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter gunsela

    (@gunsela)

    Update**
    i made some changes on nginx conf now my site goes to url.com/the_seo_framework_sitemap=xml and that redirects to homepage

    Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    I believe that if you remove the |xml part from the first block, the sitemap should show up. But, since you also have other rules in place, you may need to do additional work.

    The /?the_seo_framework_sitemap=xml endpoint no longer functions because we do not make use of WordPress’s rewrite rules anymore since TSF 4.0. So, you should remove that as well.

    With all that said, the best solution would be to use this–that’ll resolve any custom WordPress query correctly:

    location / {
            try_files $uri $uri/ /index.php?$args;
    }

    That snippet is an exerpt from the full working NGINX example, which you can find here: https://www.ads-software.com/support/article/nginx/#general-wordpress-rules.

    Plugin Author Sybre Waaijer

    (@cybr)

    Hello again!

    I just updated our new sitemaps documentation to include NGINX support. You can find it here: https://tsf.fyi/kb/article/119#tsf-sitemap-nginx.

    I hope that covers everything! If anything’s unclear, let me know ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘404 Not Found on Site Map’ is closed to new replies.