Skip to content

Yoast SEO plugin – XML File not found

One client recently had a problem using the Yoast SEO plugin returning an error, file not found.

Investigating via google we found the answer directly via the Yoast.com website. You’ll need to update the htaccess file and add the following code before the bulk of standard WordPress entries. Any of our clients who require assistance with this can drop us a line.

# Yoast 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 Yoast SEO - XML Sitemap Rewrite Fix

Share this

Wordpress
cPanel
G Suite
Office 365

Contact

282 Heigham Street, Norwich, Norfolk, NR2 4LZ

Navigate

Follow us

Google Verified Reviews