WordPress SEO by Yoast – using sitemaps

If you are using the fabulous WordPress SEO plugin by Yoast, you’ll find that it also does the job of creating a sitemap for you.  You need to opt in to this within the plugin’s settings field here:
XML sitemaps” then tick the “Check this box to enable XML sitemap functionality“.

There are a few caveats that this plugin doesn’t make you aware of though and this can affect the whole indexing of your website by the search engines.

1. If you are now making reference to this sitemap elsewhere (such as within W3 Total Cache etc) then you will need to alter the path to your sitemap thus:

https://yourdomain.com/sitemap_index.xml

2.  You will need to remove any other sitemaps from your root folder. Look for:

sitemap.xml
sitemap.xml.gz

 

3.  Make sure that your robots.txt has this line:

https://www.yourdomain.com/sitemap_index.xml

 

Your XML sitemap doesn’t actually exist at this location so don’t think it’s not working if you can’t see this file. Yoast’s WordPress SEO plugin places the files in a subfolder of your uploads directory, and using WP Rewrite the URL will resolve to the right sitemap. It also works with Multi Site installs whether domain mapped or not.  To check it is functioning, fire up your browser and navigate to the sitemap (as in step 3 above). You should see the file there.

 

Hope this helps!

 

Leave a Reply

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