MENU CLOSE
  • Home
  • Blog
  • Get in touch

Hi, I am George

Hi, I am George

  • Home
  • Blog
  • Get in touch

Sitemap.xml 404 error on Nginx Fix (SEOPress on EasyEngine)

ON 02.08.2018 1 COMMENT

I just set up a new site on a Vultr VPS with EasyEngine. It took about 30 seconds.

However, EasyEngine runs on Nginx and not on Apache, rewrite rules are not handles via .htaccess nut within the server configuration.

That is why my SEOPress plugin threw a 404 error when I tried to access the sitemaps (which I need to submit to Google).

So here is a step by step solution on how to fix that 404 Error and make the sitemap work on EasyEngine Nginx with SEOPress plugin.

This is a Windows user-friendly method.

  1. Get an FTP client like FileZilla and log in the server.
  2. Go to /etc/nginx/sites-available directory. The file names here are the specific configurations for each site you have installed on the server.
  3. Open the file for the site you want to change the config with Notepad++.
  4. Right before the closing } insert this code
    rewrite ^/sitemaps\.xml$ /index.php?seopress_sitemap=1 last;
    rewrite ^/sitemaps_xsl\.xsl$ /index.php?seopress_sitemap_xsl=1 last;
    rewrite ^/sitemaps/([_0-9a-zA-Z-]+)?\.xml$ /index.php?seopress_cpt=$1 last;
  5. Open Putty and SSH in the server with your root user and pass.
  6. Type service nginx restart in the console. This should restart the server.
  7. Done. Now the sitemap.xml should work.
PREV Google Raters Guidelines [What I learned from it and actionable advice]
NEXT Installing OpenVPN on a Vultr server

1 Response

  1. Thanks alot

    wan mohd afendi 4 years ago Reply

Leave a Comment Cancel Reply

  • Recent Posts

    • Защо избрах хостинг в Jump?
    • Fonts not working on XAMPP (localhost) on Firefox [Solution]
    • Migrating EasyEngine 3.8 to WordOps
    • Solve “Error establishing a database connection” of WordPress on a VPS (EasyEngine v4)
    • My Conor McGregor dupe SEO experiemnt
  • Archives

    • May 2021
    • January 2021
    • June 2020
    • May 2020
    • March 2020
    • February 2020
    • January 2020
    • December 2018
    • August 2018
    • July 2018
    • May 2018
  • Categories

    • SEO