XML Sitemaps in the Yoast SEO plugin

Last update: 02 May, 2018

Having an XML sitemap can be beneficial for SEO, as Google can retrieve essential pages of a website very fast, even if the internal linking of a site isn’t flawless.

The sitemap index and individual sitemaps are updated automatically as you add or remove content and will include the post types you want search engines to index. Post Types marked as noindex will not appear in the sitemap. To learn more about how to noindex see: How do I Noindex Urls ?

Table of Contents

Get access to our kick-ass support team with Yoast SEO Premium

Enable XML Sitemaps

  • Log in to your WordPress website. When you're logged in, you will be in your 'Dashboard'. On the left-hand side, you will see a menu. In that menu, click on 'SEO'
  • The 'SEO' settings will expand providing you additional options. Click on 'General'.
    Admin > SEO > General
  • Click on the Features tab.Admin > SEO > General > Features
  • Toggle the 'XML Sitemaps' switch to 'On'.
  • Click 'Save Changes' to activate XML Sitemaps.

Disable XML Sitemaps

  • Log in to your WordPress website. When you're logged in, you will be in your 'Dashboard'. On the left-hand side, you will see a menu. In that menu, click on 'SEO'
  • The 'SEO' settings will expand providing you additional options. Click on 'General'.
    Admin > SEO > General
  • Click on the Features tab.Admin > SEO > General > Features
  • Toggle the 'XML Sitemaps' switch to 'Off'.
    Admin > SEO > General > Features > XML Sitemaps
  • Click 'Save Changes' to disable XML Sitemaps.

View The Sitemap

  • Log in to your WordPress website. When you're logged in, you will be in your 'Dashboard'. On the left-hand side, you will see a menu. In that menu, click on 'SEO'
  • The 'SEO' settings will expand providing you additional options. Click on 'General'.
    Admin > SEO > General
  • Click on the Features tab.Admin > SEO > General > Features
  • View your XML Sitemap by clicking the question mark next to the XML sitemaps toggle.

Limit the number of sitemap entries

You can limit the number of sitemap entries by using the filter wpseo_sitemap_entries_per_page. Here follows example code to limit the max entries to 100:

function max_entries_per_sitemap() {
return 100;
}

add_filter( 'wpseo_sitemap_entries_per_page', 'max_entries_per_sitemap' );

Are you having issues with your sitemap?

Maybe you need a different guide after enabling the sitemap.

Is your sitemap not updating? Is your sitemap a blank page? Or are you looking for common XML sitemap errors? You can also use our search bar at the top to search for your specific issue.

If you have a sitemap that is located on example.com/sitemap.xml, your sitemap is not being generated by our Yoast SEO plugin. It is probably generated by Google XML Sitemaps or another XML sitemaps plugin. Please disable other sitemap plugins and remove any sitemap files via FTP before enabling the sitemaps in our plugin.

Was this article helpful? ·