Sitemap.xml redirects to sitemap_index.xml

For some reason, mydomain.com/sitemap.xml is automatically redirecting to mydomain.com/sitemap_index.xml.

I tried deactivating all plugins except SmartCrawl and the WPMU DEV Dashboard and switching to Twenty Seventeen theme, but the issue is still there.

  • Pelletier

    Hello,

    We install the plugin WP sitemap XML to verify if the problem come from Smart Crawl SEO (we desactivate the sitemap option on SCSEO). It doesn't work so we contact our hosting service and he add this rule on Nginx :

    location ~ ([^/]*)sitemap(.*)\.x(m|s)l$ {
    ## Google XML sitemap
    rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.xml$ "/index.php?xml_sitemap=params=$2" last;
    rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.xml\.gz$ "/index.php?xml_sitemap=params=$2;zip=true" last;
    rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.html$ "/index.php?xml_sitemap=params=$2;html=true" last;
    rewrite ^/sitemap(-+([a-zA-Z0-9_-]+))?\.html.gz$ "/index.php?xml_sitemap=params=$2;html=true;zip=true" last;

    ## STOP logging acces sitemap
    access_log off;
    }

    It works now : https://vivrenimes.fr/sitemap.xml
    But Smart Crawl Seo seems to drive again the sitemap even if the option is desactivate.
    How can we solve that problem ? Can you give a us the rule for Smart Crawl / nginx ?
    Shall we desactivate then reactivate Smart Crawl to use correctly Google XML Sitemap ?

    Antoine

  • Kasia Swiderska

    Hello Antoine,

    But Smart Crawl Seo seems to drive again the sitemap even if the option is desactivate.
    How can we solve that problem ? Can you give a us the rule for Smart Crawl / nginx ?
    Shall we desactivate then reactivate Smart Crawl to use correctly Google XML Sitemap ?

    Can you tell me what do you mean by "correctly Google XML Sitemap "? Your sitemap right now is a correct XML - it uses correct XML for Sitemaps:

    kind regards,
    Kasia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.