Support » Plugin: The SEO Framework – Fast, Automated, Effortless. » No output of the sitemap.xml

  • Resolved jkin


    Hi, I don’t see any sitemap.xml on my site, after I select to output the sitemap.xml.

    I am using EasyEngine Nginx’s FastCGI Cache + W3TC.

    Please help to advise how to solve this problem.

    Best regards,


    • This topic was modified 5 years, 7 months ago by jkin.
Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Sybre Waaijer


    Hi @jkin,

    Please go to /wp-admin/options-permalink.php and hit “Save Changes”.

    This should effectively “reboot” the rewrite system, which will solve this issue.
    Some themes or plugins are unfortunately able to cause an inconsistency in its cache.

    I hope this helps! 🙂 Cheers!

    Thread Starter jkin



    thank you.

    Yet, this won’t work. .. any other suggestion?

    The page went into 404.


    May I chip in?

    Did you get WordPress 404 or Nginx 404?

    WordPress 404 means your request is processed by WordPress and you’ll see the standard header, menu, footer, etc.

    Nginx 404 means your request will not reach WordPress and you not see any styles or header, menu or footer (of your standard WordPress install).

    If you get WordPress 404, it means there is an issue with the plugin or some other conflicts within WordPress.

    If you get 404 at the server-level, then there is an issue with the server configuration. In this case, please see below for an explanation…

    The general problem with certain Nginx setup is that they think that the sitemap is generated (after each new post) and is available at a pre-determined location. So, they configure something like the following in their Nginx server…

    location ~ \.xml {
      expires max;
      try_files $uri =404;

    This basically translates into…

    1. Look for XML files.
    2. If the file is found, setup expires headers to maximum possible value and then serve the file
    3. If the file is not found, send a 404 response.

    In order to fix it, look for the text “xml” in your Nginx configurations, delete *only* the text “xml” in it and restart / reload the web server to apply the changes.

    I hope that helps.

    Thread Starter jkin


    Hi, Pothi,

    Thank you so much for your detailed explanation.

    I see theme in the 404 page, hence, I think this should be something that you explained: a conflict with plugin issue.

    Is error-n-trial the only way to find out what plugin caused this problem?

    I will try to find it out first.

    Thank you again.

    Plugin Author Sybre Waaijer


    Feel free to chime in at any time! Your feedback is really appreciated 😀

    The XML file generated by TSF is “virtual”, this means there’s no file — but an endpoint of sorts.

    I overlooked the “NGINX” part of your earlier request.
    I’m no expert on NGINX, so I believe you should first follow Pothi’s advice.

    In any case, I do know that adding this to your site’s NGINX config file works (first line is XML file, second line is XSL styling):

    rewrite ^/sitemap\.xml$ /index.php?the_seo_framework_sitemap=xml last;
    rewrite ^/sitemap\.xsl$ /index.php?the_seo_framework_sitemap=xsl last;

    The only issue is that if you ever wish to switch sitemap plugins, those lines then need to be adjusted accordingly.

    Cheers 🙂

    i cant find the file where this code must be placed 🙁 i tried here (/etc/nginx/nginx.conf) but it crashed my site

    • This reply was modified 5 years, 6 months ago by angldavd.

    Sorry to know that, @angldavd.

    Please post the content of /etc/nginx/nginx.conf file so that we can go from there. We could find the traces of where to place this code, in /etc/nginx/nginx.conf file.

    In general, look out for the “server” block that would look something like…

    server {
      listen 80;

    Please insert the code inside the server block. I hope that helps.

    i put the code on site_enabled/ but still is redirected from sitemap.xml to sitemap_index.xml x_x

    Plugin Author Sybre Waaijer


    Hi @angldavd,

    There should still be a rule redirecting sitemap.xml to sitemap_index.xml somewhere in the configuration files. I believe there’s also a site-specific configuration file, but I’m not really sure about this.

    Please check for either of these rules:

    # Rewrites for Yoast SEO XML Sitemap
    rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
    rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;


    #Yoast SEO Sitemaps
    location ~ ([^/]*)sitemap(.*).x(m|s)l$ {
    ## this redirects sitemap.xml to /sitemap_index.xml
    rewrite ^/sitemap.xml$ /sitemap_index.xml permanent;
    ## this makes the XML sitemaps work
    rewrite ^/([a-z]+)?-?sitemap.xsl$ /index.php?xsl=$1 last;
    rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
    rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
    ## The following lines are optional for the premium extensions
    ## News SEO
    rewrite ^/news-sitemap.xml$ /index.php?sitemap=wpseo_news last;
    ## Local SEO
    rewrite ^/locations.kml$ /index.php?sitemap=wpseo_local_kml last;
    rewrite ^/geo-sitemap.xml$ /index.php?sitemap=wpseo_local last;
    ## Video SEO
    rewrite ^/video-sitemap.xsl$ /index.php?xsl=video last;


    Those should be replaced with the given code before.

    I hope this helps!

    My problem is that there´re no rules on my site conf

    Plugin Author Sybre Waaijer


    Hi @angldavd,

    If you use EasyEngine, please look for this file too, there might be some rules in there:

    Cheers 🙂

    yes, it was some rules there but i already deleted -_-

    • This reply was modified 5 years, 6 months ago by angldavd.
    Plugin Author Sybre Waaijer


    Hi @angldavd,

    I understand that this is frustrating, as no alterations seem to work.

    EE includes unconventional third party support
    I’ve learned that EasyEngine automatically puts code in their configuration file(s) to make sitemap_index.xml work rather than sitemap.xml:

    The code block listed in that issue is exactly what’s causing this redirect.

    Restart NGINX
    When everything’s set up, do not forget to restart NGINX, I forgot to mention that.

    Contact EE devs
    If you’re still encountering issues, please submit a request at the rtcamp forums, because I can only go so far as this with supporting their software.

    Best of luck!

    I’ve opened a GitHub issue regarding this topic:

    • This reply was modified 5 years, 6 months ago by Sybre Waaijer.
Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘No output of the sitemap.xml’ is closed to new replies.