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
    • New Recruit

    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
    • Support nomad

    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

  • MechKW
    • WPMU DEV Initiate

    I'm having this EXACT same problem. Down to an exact match on the same wrong URL. I tried the snippet posted above and restarted nginx but NO DICE. I see Pelletier's site appears to be working correctly now... How did you resolve this issue?

  • Ash
    • WordPress Hacker

    Hello MechKW

    The issue could be same but can be caused for different reason. Would you please join our live chat session so that we can check? If needed, we will create a separate ticket for you as well :slight_smile:

    You can join our live chat here: https://premium.wpmudev.org/live-support/

    This way we can deal with your issue separately and the original poster of this ticket won't be bothered with email notification.

    Have a nice day!

    Cheers,
    Ash

  • Ash
    • WordPress Hacker

    Hello MechKW

    The issue could be same but can be caused for different reason. Would you please join our live chat session so that we can check? If needed, we will create a separate ticket for you as well :slight_smile:

    You can join our live chat here: https://premium.wpmudev.org/live-support/

    This way we can deal with your issue separately and the original poster of this ticket won't be bothered with email notification.

    Have a nice day!

    Cheers,
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.