• Resolved hdeveza

    (@hdeveza)


    I’m getting 404 error, since my website uses NGINX. So It shows the message:

    “Since you are using Nginx as your web-server, please configure the following rewrite rules in case you get 404 Not Found errors for your 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;

    But I dont even know where to insert all that stuff, what file? Where is that file located? Can you help me on this please?

Viewing 6 replies - 1 through 6 (of 6 total)
  • I have the same issue. I’m using all in one SEO and easyWP. I am told that Yoast allows for the easy creation of a sitemap but not all in one SEO, which I think puts this issue on them to fix (or else we should all just use Yoast)

    Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    allows for the easy creation of a sitemap but not all in one SEO

    All in One SEO Pack definitely allows for the easy creation of a sitemap.

    There’s something screwy going on with namecheap’s wordpress service or easywp or all in one seo. It shouldn’t be this difficult. My wesbite is https://www.foreverozone.com/sitemap.xml It forwards to sitemap_index.xml Don’t know why. I’ve asked namecheap for heap previously to install some code to help with another sitemap plug-in that required adding code to make the server read the sitemap. That might be the problem. Before that, google couldn’t find the xml sitemap.

    Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    First of all, I see that your sitemap has been created by the Google XML Sitemap plugin, so I’m not sure why you’d say something is wrong with All in One SEO Pack.
    Secondly, if sitemap.xml is redirecting to sitemap_index.xml, that implies you likely have or had Yoast installed, which does that. You either have caching still doing the redirect or else still have their rewrite rules.

    You can find documentation on the NGINX rewrite rules for All in One SEO Pack here: https://semperplugins.com/documentation/xml-sitemap-rewrite-rules-for-nginx/

    If you’re using NGINX, you have to add rewrite rules in order to use a dynamically generated sitemap, there’s no way around that currently. All in One SEO Pack does have the ability to use static sitemaps though that shouldn’t need the rules.

    I had the free version of Youst but chose all in one. Lighter, won’t slow down my site as much as youst per my research. I do have the google sitemap app installed. I’ll delete that and see what happens. Thanks for the links. I passed that info off to my host who said they’d install it on the server. I’ll update if they were able to get aioseo to work

    Okay, I disabled the google sitemap generator. We’ll see if the namecheap hosting techs can find the correct place to install that file on the server. They seem to question whether or not it will be permanent. Said something about the server updates might delete it. It doesn’t make any sense to me. If this is a known issue, and an XML sitemap is so important, why isn’t that code included automatically?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘404 on NGINX SERVER’ is closed to new replies.