Sitemap redirects to homepage
-
Hi
I’ve moved to Yoast from the Rankmath plugin as Rankmath was slowing my admin panel significantly.
I like Yoast but I have a problem: my sitemap – broughtonschoolofmotoring.com/sitemap-index.xml – redirects to my homepage.
The non pretty permalink (/?sitemap=1) does show the sitemap though so I added the following code to my .htaccess:
# 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?yoast-sitemap-xsl=$1 [L]
# END Yoast SEO – XML Sitemap Rewrite FixI have cleared the site’s cache and flushed the permalinks.
But the problem remains.
I have spoken to my host who say there is no problem at their end and nothing is blocking Yoast on the server.
Can you assist?
The page I need help with: [log in to see the link]
- The topic ‘Sitemap redirects to homepage’ is closed to new replies.