Skip to main content
WordPress made easy with the drag & drop Total WordPress Theme!Learn More

How to Create a WordPress Sitemap

Websites come in all different sizes. And the larger a website, the more difficult it becomes to navigate through the website without effective navigation menus. Now that’s from a human perspective. From the perspective of a crawler (a bot sent by search engine to check out your website), the same is very much applicable. Which is where having a WordPress sitemap comes in.

What is a WordPress Sitemap?

A sitemap is very similar to a real map. Consider it an e-map for search engines, it helps search engines find and access every page of your website easily.

Why are Sitemaps Important?

In short, it is definitely better to have sitemaps than it is, not to have them. They make a search engine’s job a bit easier and most web admins who submit their sitemaps tend to benefit from it more often than not.

  • Your website is genuinely large or has a lot content under many different categories. When websites become larger they make it more difficult for search engines to navigate and crawl through newer content.
  • If you have a lot of content which has been poorly linked to each other, if you have any content that is isolated from your website. This content, which otherwise has no reference is basically an orphan and has no means of access for a visitor. Let us for a second assume, that this isolated content lacks any incoming links from other websites as well. In such a situation, if search engines do not provide a link for them, they will be totally isolated with no traffic what so ever. A sitemap will cover non-referenced, isolated content on your website.
  • Sitemaps also take into account websites’ rich media information and meta data. This helps search engines understand what your website is all about and also the importance of particular URLs on your website relative to other URLs on the same site.
  • Google also informs us that sitemaps may aid the websites themselves, although a sitemap does not guarantee that every web page is indexed.

Where Can You Find the WordPress Sitemap?

In general, the WordPress sitemap can be found at:

yoursite.com/sitemap.xml
yoursite.com/wp-sitemap.xml
yoursite.com/sitemap_index.xml

Note: The exact location of your sitemap index will depend on how it is added to your WordPress site.

How to Add a Sitemap to WordPress?

Since WordPress 5.5, there is a default sitemap built-in. So you don’t have to do anything to add a sitemap to WordPress as it’s already there. Just by using WordPress your website URLs are crawlable by search engines. This means that search engine bots can readily index your site – an important part of SEO.

WordPress Sitemap Plugins

The default sitemap is fine for most users. But if you would like to customize your sitemap, you have the option to use a dedicated WordPress sitemap plugin or a general WordPress SEO plugin.

In both cases this will disable the default WordPress sitemap and add a new sitemap created by the plugin. We’ll show you how to use two top options below.

XML Sitemap Generator

One route is to use a simple, dedicated sitemap plugin. The most popular option the XML Sitemap Generator. This plugin creates a sitemap which is stored and made available to search engine crawlers.

All of your plugin settings can be found under Settings > XML-Sitemap. As you can see from the screenshot below, the website’s sitemap is stored at the /sitemap.xml extension and there are loads of easy options.

XML Sitemap Generator

XML Sitemap Generator pings search engine automatically, though there is also a quick link to notify them. The sitemap’s URL is added to the robots.txt file which the first destination of search engine bots to find more information about the website (and in case you were wondering, the robots.txt file is basically what tells search engines which URLs not to crawl, where as a sitemap is designed to do the exact opposite).

Apart from the ability to decide which parts of your website gets included as part of your web sitemaps, you can also assign specific values of priority and frequency of sitemap generation for each of the aforementioned aspects of a WordPress website.

How to Exclude Content with XML Sitemap Generator

With XML Sitemap Generator plugin, you can specify which of the following is included in your sitemap. Similarly, you can also exclude certain categories, pages, specific posts and more:

  • Homepage
  • Posts
  • Pages of multi page posts
  • Static Pages
  • Categories
  • Archives
  • Author Pages
  • Tag Pages

Yoast SEO

If you are already using a general WordPress SEO plugin then sitemaps are likely an included feature.

Given that a great number of WordPress bloggers use Yoast SEO we’re using it as an example of how to can create and submit sitemaps using a SEO plugin. Just know that the steps may be a bit different if you’re using AISEO, Rank Math or another similar plugin.

With most search engine optimization plugins sitemap generation is typically enabled by default. For Yoast, you can see under the Yoast SEO > Settings > General > Site Features section that sitemaps are enabled.

Yoast General Site Features: Sitemaps

It isn’t sufficient to merely create the sitemaps – search engines need to be notified of the change. Yoast makes this easy, since the plugin automatically notifies (or pings) major search engines like Google.

Yoast SEO also produces an XML stylesheet which can be read as a HTML file. The importance of this lies in the fact that you can actually verify that the right URLs are represented and included with appropriate priority in the sitemaps.

Yoast XML Sitemap Example

It is important to ensure that your sitemap is frequently updated, or at least as frequently as you publish new posts in the very least. From the XML stylesheet above, you’ll notice there is sitemap generation information included with the number of images and the last change date specified.

All of this information is very relevant to your search engine rankings. For example, the freshness of your content including the amount of change on your website, the frequency of change and how old the content is. All three of these factors can greatly affect your site’s search engine rankings.

Keeping your content updated and relevant coupled with frequent generation of sitemaps is very effective at ensuring that your content never looses ground on search rankings because the content may be considered stale.

How to Exclude Content with Yoast Sitemaps

To exclude post types, archives and posts from your Yoast sitemap there are a few options. Your first is to simple exclude entire post types. This can be accomplished from your main Yoast Settings > Content Types section.

Yoast Exclude Content Types

From here you can simple toggle off the option to “Show posts in search results” for various post types that you do not want included in your sitemap.

But what if you want to target specific posts or pages? In that case, look for the Yoast settings when creating or editing your content. Below you’ll see an example from a post:

Yoast Per Post Sitemap Settings

Under the Advanced section there should be a dropdown to allow or dis-allow search engine to display your post in search results.

Yoast Author Sitemap Option

And last, there are similar display options for individual archive pages like for Authors. Just uncheck the option if you do not want an author’s archives included. Easy!

Manual Sitemaps

Both plugins we’ve shared above automatically submit your sitemap to search engines, so that you do not have to do it. Now the chances are, that this will work perfectly.

But if for some reason your chosen plugin does not submit your sitemap, or if you’d like to take a more hands on approach, then you can always download a copy and upload your sitemap manually. This can be accomplished through the Sitemaps Report in your Google Search Console, using the Search Console API, with the Google ping tool or just by linking to your sitemap in your robots txt file allowing crawlers to locate your sitemap organically. And if you’d rather not use a plugin for sitemap creation, you can use this sitemap tool instead or even create your sitemap by hand (though this could take a very long time).

It is a fairly simple process, but continually generating sitemaps and submitting them manually is time consuming. This method would only make sense if you rarely publish new posts or make changes to your site. For the majority of website it is a much more productive use of your time to rely on the default WordPress sitemap or employ one of the two plugins mentioned above. This way you can easily create and update your sitemaps frequently which will keep your website always within the scope of Google’s search lens (and give you more time for content creation!).


There is ever more emphasis on developing better machine learning based algorithms, search engines like Google are literally getting smarter. But no matter how smart they get, a sitemap can always help the crawlers to act intelligently and it gives you some quantum of control over how seriously a search engine takes the different parts of your website.

4 Comments

  1. Frederick

    Many thanks for the great article!

    The Yoast SEO plugin is quite a large plugin. XML Sitemap Generator gets my preference if you are just looking for an XML sitemap.

    • Vishnu

      Many people are already using Yoast SEO, at least many SEO conscious web admins. If on the other hand you aren’t using a plugin dedicated to SEO like Yoast’s and you’re looking to just create sitemaps XML – Sitemap Generator is definitely the better choice. It is certainly smaller plugin with a lot less in the way of functions to aid in SEO for WP sites.

  2. Apoorv Agarwal

    great artcle…really

  3. alivetear

    Thank you for that great article!

    The Yoast Search engine optimization wordpress plugin is a reasonably large wordpress plugin. XML Sitemap Generator will get my preference if you’re just searching for an XML sitemap.

Leave a Reply

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

Learn how your comment data is processed by viewing our privacy policy here.