Home Internet web designing Sitemap 404 Error WordPress After Using Cache Plugin

Sitemap 404 Error WordPress After Using Cache Plugin


Sitemap 404 error on google webmaster tools even it is submited

Cause -Sitemap is not found after using cache plugin

Sitemap is an .xml file in website. In wordpress seo plugins  most of plugins generate sitemap automatically with just one click. But When user download and install cache plugin like WTC in wordpress . These plugin rewrite urls or modify .htaccess file. This is the reason , In many cases sitemap 404 error in wordpress.

Create .htaccess file
Create .htaccess file

Solution of sitemap 404 error

To solve this error , some of changes in  .htaccess are required. Login to cPanel and go to your WordPress installation folder. Locate .htaccess file. If .htaccess is not found in the folder.

Create a blank file in the folder with the name .htaccess. Copy the following code and paste in the new created .htaccess file.Read this how to create file in cPanel

# WordPress SEO - XML Sitemap Rewrite Fix
RewriteEngine On
RewriteBase /
RewriteRule ^sitemap_index.xml$ /index.php?sitemap=1 [L]
RewriteRule ^locations.kml$ /index.php?sitemap=wpseo_local_kml [L]
RewriteRule ^geo_sitemap.xml$ /index.php?sitemap=geo [L]
RewriteRule ^([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L]
RewriteRule ^([a-z]+)?-?sitemap.xsl$ /index.php?xsl=$1 [L]
# END WordPress SEO - XML Sitemap Rewrite Fix

With this code you rewrite your sitemap url. Save this file and know check your sitemap xml file . Hope it is working and your sitemap 404 error is solved.

READ ALSO : -  How To Create Wordpress Theme - For Beginners
Wordpress Sitemap Error
WordPress Sitemap Error


Note: .htaccess file is a very sensitive file in the folder. Any type of wrong code can stop your website or make some unexpected changes permanently.

This Code is tested on Yoast seo plugin , Which is also known as all in one wp seo plugin.