XML Sitemaps in the Yoast SEO plugin

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

Related Articles

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

The XML Sitemap Feature

  1. Log in to your WordPress website.

    When you're logged in, you will be in your 'Dashboard'.

  2. Click on 'SEO'

    On the left-hand side, you will see a menu. In that menu, click on 'SEO'

  3. Click on 'General'.

    The 'SEO' settings will expand providing you additional options. Click on 'General'.
    Admin SEO General

  4. Click on the 'Features' tab.

    Admin SEO General Features

  5. Toggle the 'XML Sitemaps' switch.

    To enable the feature, toggle the switch to 'On'.
    To disable the feature, toggle the switch to 'Off'.

  6. Click 'Save Changes'

View The Sitemap

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

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' );

Add an External Sitemap

Want to add an external sitemap? Use this guide.

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? ·