Yoast SEO is one of the most popular (one million plus downloaded) plugin that boosts the SEO capability of any WordPress website. The plugin is intended to add post title, meta tags (description and keywords) to WordPress posts, pages, categories and tags. It serves as a SEO plugin with many important features like Snippet Editor and preview, .htaccess and robot.txt editor, SEO analysis functionality, Social Media integration and Multi-site compatibility. Its functionality differs from rest of the SEO plugin as it does lots of SEO enhancements beyond just adding meta tags to pages. One of the most remarkable features of this plugin is, it can generate the most advanced XML sitemap compared to other sitemap generator plugins. In this post, I will show steps to generate XML sitemap using Yoast SEO plugin in WordPress. In previous post, we showed how you can install and configure Yoast plugin for the first time. We also showed how you can create a new post and make it SEO friendly using Yoast plugin.
Features of Yoast SEO Plugin in terms of XML Sitemaps
- Creates the most advanced XML sitemap where the user has ability to remove any specific post, page or taxonomies from the sitemap.
- The XML sitemap created works smoothly on larger sites as one index sitemap links to sub sitemaps that contains 1,000 posts each by default.
- The XML sitemap created using this plugin can also includes images in the website, so the images are also better indexed in the search engines.
- As this plugin uses XSL Stylesheets for XML Sitemaps, the XML sitemaps are human readable making easier for readers to spot the problems.
Generate XML Sitemap using Yoast SEO Plugin in WordPress
Step 1. Plugin Installation
To install the plugin, go to Plugins > Add New. Then search “Yoast SEO” and click on the “Install Now” button. Then click on “Activate Plugin” to activate it.
After activating the plugin SEO tab is added to the Dashboard as shown below. To update and configure the plugin, hover over the tab “SEO”. There appears 8 sub-menus: General, Titles & Metas, Social, XML Sitemaps, Advanced, Tools, Search Console, Extensions. You can browse this link to know more about all these options and how to setup them for the first time. Here, we will focus on SML Sitemaps.
Step 2. Generating XML Sitemap
Once the plugin is activated, hover over the tab “SEO”. Click “XML Sitemaps”. XML Sitemaps settings page will open as shown below. This is where you can configure various settings to generate XML Sitemaps using Yoast SEO plugin.
Under XML Sitemap functionality, ensure Enabled button is active then click on Save Changes to create the sitemap. Once the Save Changes button clicked, the sitemap will be generated at : http://www.yoursite.com/sitemap_index.xml
Step 3. Configuring Yoast SEO Plugin
General
As the plugin is activated, the General tab gets opened by default.
In General tab, there is a link to sitemap page through XML Sitemap button. There is another option as Entries per page which defines the maximum number of sub pages (entries) per sitemap page. By default, it is 1,000.
User sitemap
User sitemap is the second tab after General where author archive URLs can be enabled or disabled for sitemap.
Post Types
In this tab, Posts, Pages and Media (attachment) can be added or removed to the sitemap generated.
Excluded Posts
Individual posts can be excluded from sitemap by entering their posts ids like 9, 11, 14 where 9, 11 and 14 are the post ids.
Taxonomies
Taxonomies represent categories and tags in WordPress. Using this tab, categories and tags can be included or excluded in the sitemap.
In this way, you can generate XML Sitemap using Yoast SEO Plugin in WordPress.
Related Posts

Dhiraj Bikram Khadka

Latest posts by Dhiraj Bikram Khadka (see all)
- Check Broken Links with Broken Links Checker Plugin in WordPress - June 22, 2016
- Generate XML Sitemaps using Better WordPress Google XML Sitemaps Plugin - June 16, 2016
- Enable XML sitemaps in All in One SEO Pack Plugin - June 5, 2016