Fixing the Yoast SEO XML Sitemap for Open SEO Stats Chrome Extension
By [Matthew Bean](/content/ "Visit Matthew Bean’s website"/index.html) May 16, 2017
Yoast is a good SEO plugin for WordPress if you’re like me and don’t want to spend 2 hours on each post or page you want to publish. However, I just noticed that my chrome extension was saying that my website didn’t have a sitemap! ha… I’m using WordPress with the Yoast plugin and it generates a sitemap as sitemap_index.xml.
So anyway, to get the “green checkmark” from the chrome Open SEO stats Extension and avoid confusing the ‘internet’ just put this following code in your .htaccess: (Make sure mod-rewrite is on… but really, who’s isn’t for WordPress sites – oh, and of course replace your website name for exampledomainname, and remove the “s” on https if your site isn’t secure):
RewriteCond %{HTTP_HOST} ^exampledomainname\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.exampledomainname\.com$
RewriteRule ^sitemap\.xml$ "https\://www\.exampledomainname\.com\/sitemap_index\.xml" [R=301,L]
Open SEO Stats | Sitemap | Yoast
About the Author
Matthew Bean is a Web Developer and SEO specialist for MAX Website Design. After earning a degree in Decision Science and Information Systems from the University of Kentucky, he continued to develop and grow his knowledge of web technologies in Montreal, QC, earning a Diploma in Web Development from the University of Concordia. Matt resides in Montreal with his wife and two children and is an avid curler.