Creating a WordPress Sitemap: The Complete Guide (2023)


Creating a WordPress Sitemap

Sitemaps are an important part of a search engine optimized website.

They help the crawlers of Google and other search engines to find the pages and content on your website completely and faster.

But they also help your readers and customers to find their way around your site better. Creating a WordPress sitemap should therefore be one of the first SEO activities you tackle when creating a new website, because your sitemap not only makes your (online) life easier, but also that of your visitors.

In this post I will show you step by step how to create a sitemap in WordPress. which different sitemap types there are, whether you need paid SEO plugins such as Yoast SEO or Rank Math or whether the free versions are sufficient and what you should definitely pay attention to when creating your sitemap.

Table of contents
  • 1. What is a sitemap?
    • 1.1 XML Sitemap
    • 1.2 HTML Sitemap
  • 2. Create XML sitemaps in WordPress
    • 2.1 With the native function of WordPress
    • 2.2 With Rank Math
    • 2.3 With YoastSEO
    • 2.4 With a sitemap plugin
    • 2.5 Which pages should be in the XML sitemap and which shouldn't?
    • 2.6 Where can I find my XML sitemap?
    • 2.7 How can I submit an XML sitemap to Google?
  • 3. Create HTML sitemap in WordPress

1. What is a sitemap?

A sitemap is a structured overview of all content on a website.

The contents of the sitemap can include individual websites (subpages), but also PDF documents, images and videos.

There are two types of sitemaps:

1.1 XML Sitemap

An XML sitemap is a text file that contains URLs of a website in a specific format based on the XML (short for EX tensible M arkup L anguage ) markup language.

An example XML sitemap with a URL (that of the home page) might look like this:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="">

In addition to the URLs themselves, XML sitemaps or sitemap files can contain additional information, such as e.g.:

  • the date the URLs were last modified
  • their update frequency (e.g. hourly, daily, monthly, yearly)
  • their priority (from 0.0 to 1.0)
  • included images
  • and other content

XML sitemaps are usually only read by search engines such as Google and Bing. Your sitemap offers your visitors no added value and only exists to make it easier for Google and Co. to record the content of your website in full.

As a rule, there are separate sitemaps for different content types, which are all combined in an index file.

With WordPress, most tools create independent sitemaps for pages, posts, categories, tags, custom post types and sometimes also for media.

Creating an XML sitemap is quick and easy with an SEO plugin like Yoast SEO , Rank Math or other SEO plugins. But more on that in a moment.

1.2 HTML Sitemap

An HTML sitemap serves to provide your visitors with an overview of all or all important pages on your website.

HTML sitemaps mostly consist of simple text links and are structured hierarchically.

Apple uses the HTML sitemap on its website as a menu to display the content or structure of the page. The structure of the sitemap shows that it is used to display a listing of the articles. Ideally, support will be contacted less, since the good structure of the sitemap already provides information and solutions to many potential questions.

Basically, HTML sitemaps are used for readability for the visitor and an XML sitemap helps the search engine to better classify the content.

2. Create XML sitemaps in WordPress

There are many different ways to create an XML sitemap in WordPress.

In the following I would like to show you four simple and fast ways for your site:

2.1 With the native function of WordPress

Since version 5.5, WordPress automatically creates an XML sitemap, which can be accessed at the following address:

While this is a good thing, it also has some disadvantages:

By default, all content on your WordPress website is included in the XML sitemap.

So also content that you might not want to have there at all, e.g. B. Tags, Categories, or Custom Post Types (post types created by plugins or your theme, such as sliders or testimonials).

And unfortunately, as of now, there is no way to exclude XML sitemap content via settings in the WordPress admin or in the posts of your WordPress site itself.

An exclusion of individual posts or post types is only possible via the functions.php .

This is better and easier! You can also manually create your WordPress sitemap using SEO plugins like Rank Math and Yoast SEO.

2.2 With Rank Math

The Rank Math SEO plugin offers a great and extensive WordPress sitemap feature.

After the initial setup, you can go to Rank Math > Sitemap Settings to define exactly what content should and should not be included in your XML sitemap.

Here you can not only activate or deactivate individual file types and content, but also exclude individual posts via the post ID and specify exactly how many entries an XML sitemap should contain.

If you publish a new post, which is then logically also included in the WordPress XML sitemap, Rank Math automatically contacts Google, Bing and other search engines and communicates the changes. As a result, your content is sometimes indexed faster and can also rank faster - in the spirit of SEO.

The XML sitemaps (more specifically, the sitemap index) created by Rank Math can be found at the following URL:

2.3 With YoastSEO

Also, the popular SEO plugin Yoast SEO includes a WordPress sitemap feature that works a bit differently than Rank Math's.

Which posts and post types are included in the WordPress sitemap cannot be set individually with Yoast SEO, but depends on their sitemap indexing settings.

If it is set in the Taxonomies setting of the sitemap display in the search > Categories that these should be excluded from the search results, they will not be included in the WordPress sitemap either.

This has the great advantage that you then have less configuration effort for the XML sitemap and the risk of incorrect settings is lower than with the manual WordPress sitemap setup.

On the other hand, the Yoast SEO XML sitemap is not as customizable as the Rank Math sitemap.

The XML sitemap from Yoast SEO can be reached at the following URL:

2.4 With a sitemap plugin

Besides the two SEO plugins mentioned above, Rank Math and Yoast SEO, you can also use a standalone plugin to create your WordPress sitemap.

The standard plugin for a sitemap has always been Google XML Sitemaps by Arne Brachhold, which is by far the most popular plugin of its kind with 2+ million downloads and an average rating of 4.9 stars. This plugin helped many operators of a website or blog to create the sitemap.

After installation, the plugin automatically creates an XML sitemap, which you can find at the following address:

The lean and clear backend offers you all the important functions at a glance, making it much easier to use your sitemap.

Search engines are automatically pinged after publishing new content. You can also specify exactly what content should and shouldn't be included in your WordPress sitemap, keeping your XML site tidy and not having all content indexed.

It is also worth mentioning that the plugin allows you to display the XML sitemap in HTML format. This saves you the work of creating this HTML sitemap yourself later.

2.5 Which pages should be in the XML sitemap and which shouldn't?

With search engines, especially with Google, only those pages of a website that are relevant for search engine users and customers should be in the index.

This is not the case with many websites that WordPress generates.

In addition to posts and pages, WordPress generates e.g. e.g.:

  • categories
  • Tags
  • date archives
  • Author Archives
  • Attachment posts (a new post is created with each file uploaded to WordPress)
  • Custom post types (e.g. image galleries, portfolios, testimonials, pop-ups etc.)

Sometimes it can happen that for every 100 posts, a whopping 500, 1,000 or even more additional websites end up in the Google index.

While Google is now good at finding and detecting irrelevant pages on its own and not indexing them anymore, "bloated sites" can lead to problems such as: e.g.:

  • a manual action due to thin content  (although quite unlikely)
  • an algorithmic tiering of your site  (more likely, e.g. some sites experienced visibility losses in 2018 after  a bug in Yoast 7.0 caused attachment posts to be indexed )
  • Problems with duplicate content  (Google no longer knows which of your pages or posts is relevant to a topic)
  • The pages or posts that really matter are crawled  (i.e. visited by Google for updates) less often

In addition, no pages should be included in the XML sitemap that are reported as errors in the Search Console.

This includes, for example, redirected URLs or pages that have been classified as noindex in the sitemap settings.

2.6 Where can I find my XML sitemap?

Depending on which plugin or which option to create a sitemap you have chosen, it can be found under different URLs.

Here you will find the URLs of eight common WordPress plugins or options:

                     plugin                                                   URL
Google XML Sitemaps
rank math
Squirrly SEO
The SEO Framework
WordPress (native)

2.7 How can I submit an XML sitemap to Google?

Submitting your XML sitemap to Google is relatively simple. The only requirement is a free registration of your website with the Google Search Console.

Under the menu item Index > Sitemaps you then have the option of storing the address of your sitemap.

Tip: You don't have to submit each sitemap individually to Google Search Console. The URL of the index sitemap is sufficient. Google automatically finds all the sitemaps it contains.

Once you have submitted your WordPress sitemap to Google, you can also use the Google Search Console to track how Google processed each page and whether there were any errors submitting your sitemap.

3. Create HTML sitemap in WordPress

For very large and extensive projects that have a large number of subpages, an HTML sitemap is a useful addition to the main menu.

With this sitemap, which you can understand like a table of contents for your entire WordPress website, your visitors can find their way around better and faster.

If you want to create such an HTML sitemap, you have two options:

  1. You create the WordPress sitemap by hand (I wouldn't recommend it)
  2. You are using a plugin to create your sitemap

While I'm a big fan of doing as much work as possible without plugins, I can't really underline this for creating an HTML sitemap.

For large websites, it can take a long time to capture and link all subpages.

The best plugin I've found for this so far is Simple Sitemap.

Simple Sitemap is not only compatible with Gutenberg, but also comes with numerous customization options:

You can exclude individual pages or adjust the order of the entries as you wish. Even Elementor is supported. Creating an HTML sitemap is really helpful, as you can see from the example of the Apple site, and still has great added value in terms of presentation for the visitors to your site or blog.

Your HTML sitemap serves as an alternative to your main menu and is ultimately intended to help readers navigate your site.

Powered by Blogger.