sitemap_index.xml – 404 Not Found?

Recently, when I was working with my old website, I was stumbled upon with a problem on WordPress SEO as the sitemap URL was returning 404. In order to help some users who are also encountering this, I have listed below 3 quick tips on how to solve this kind of problem:

1.) Deactivate/activate the Plugin – some users confirmed that deactivating/re-activating WordPress SEO Plugin can fix the problem.

2.) Re-saving Permalinks – There’s no harm in resetting your permalinks (can be found at Settings > Permalinks). You don’t have to make any changes, just click Save Changes button. And guess what? This method really fixed my issue! What a lifesaver πŸ™‚

3.) Editing your .htaccess file – Yoast Team suggested adding this code on .htaccess will solve the issue. They claim that the problem lies on poor theme coding and/or to other plugins.

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]

Warning!! Ask help to some experienced people if you don’t know what you are doing. Editing .htaccess file can really harm your website.

Those 3 quick tips will surely solve the issue. If those above won’t solve your problem, feel free to comment below πŸ™‚

Leave a Reply

Your email address will not be published. Required fields are marked *