By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
GetaAapp
  • Home
  • Products And Offers
    • Best Seller
    • Discounted Products
    • Exclusive Offers
    • Latest Deals
    • Limited Time Offers
    • Top Brands
  • Category
    • Gadgets
    • Home
    • TV
    • Laptop
    • Games
    • Refrigerators
    • Kids
    • Exclusive Offers
    • Other
Reading: WordPress Sitemap 404 Not Found Error with Nginx
GetaAappGetaAapp
Font ResizerAa
Search
  • Thereev-home
  • Product And Offers
    • Best Sellers
    • Discounted Products
    • Exclusive Offers
    • Latest Deals
    • Limited Time Offers
    • Top Brands
  • Category
    • Gadgets
    • Home
    • TV
    • Laptop
    • Games
    • Refrigerators
    • Kids
    • Exclusive Offers
    • Other
Follow US
© 2024 Copyright The Reev. All Rights Reserved
blue and white star illustration
SEOWordpress

WordPress Sitemap 404 Not Found Error with Nginx

admin
Last updated: December 5, 2024 5:04 pm
By admin 1 Min Read
Share
SHARE

Sitemap 404 Not Found

If you’re using Nginx as your web server and install the Google XML Sitemap plugin in your WordPress web site, then when you submit your xml sitemap to Google Search Console, you may get a WordPress sitemap 404 not found error.

Contents
Sitemap 404 Not FoundThe Solution

sitemap 404 not found

The Solution

The answer is easy, simply copy the next strains to your nginx virtual host file. On CentOS/Redhat Server, the virtual host file usually is /etc/nginx/conf.d/yoursite.com.conf. On Debian/Ubuntu Server, it’s situated at /etc/nginx/sites-available/yoursite.com

 

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;

Save the virtual host file and reload Nginx.

sudo systemctl reload nginx

or

sudo /etc/init.d/nginx reload

If you first installed Google XML Sitemap plugin, it will give a warning if you’re using Nginx. The above rewrite rules may also be found if you go to Settings > XML-Sitemap.

Following this will ensure your Google Search Console shows less failures, errors and all pages index faster.

You Might Also Like

Understanding Slug in WordPress

Solving WordPress Site URL Redirect Loop Issue

TAGGED:Google SearchSEOSitemap XMLWordpress

Follow US

Find US on Social Medias
FacebookLike
TwitterFollow
InstagramFollow
YoutubeSubscribe

Wordpress (3)
Troubleshooting (1)
Basics (1)
SEO (1)

More Related Post

coding
Basics Wordpress

Understanding Slug in WordPress

By admin 2 Min Read
wordpress, web, design
Troubleshooting Wordpress

Solving WordPress Site URL Redirect Loop Issue

By admin 2 Min Read
GetaAapp

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries…

Categories

  • The Escapist
  • Entertainment
  • Bussiness

Quick Links

  • Advertise with us
  • Newsletters
  • Complaint
  • Deal

© 2024 Copyright  GetanApp. All Rights Reserved

Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?