create xml sitemap

How to Create an XML Sitemap in WordPress: Advantages, Plugins & Webmaster Tools

With an XML sitemap, you help search engines to easily understand the structure of your WordPress website. You make the crawlers' work easier and determine which content should be indexed by Google & Co. This article explains the long-term advantages of a sitemap, which two useful WordPress plugins you can use for this purpose and how to submit an XML sitemap. 

What is a sitemap anyway?

When talking about the so-called "sitemap" of your WordPress website, usually the so-called XML sitemap is meant. The abbreviation XML stands for "Extensible Markup Language". This is, simply put, a language for the exchange of hierarchically structured data in the form of a text file.

In the XML sitemap, all URLs - or rather, a list of all URLs (individual pages, documents) - are thus displayed. The main purpose of this list is that it can be read by machines. More precisely, the website crawlers of the search engines use this list to index the contents of your website quickly and easily. 

You don't have to create an XML sitemap in WordPress but it is recommended. It makes the work of Google and Co. easier and your content is usually listed faster in search results. To this end, you can also submit your WordPress websitemap to search engines such as Google or Bing. 

In addition to the so-called XML sitemap, which is primarily intended for machine readout, there is also the HTML sitemap. This is not a text file, but an HTML page, on which all subpages of a website are listed in a table. This sitemap is just there for visitors to gain an overview of your website's content.

In the following image, you'll find an XML sitemap of my blog. Here you can see that the sitemap lists single posts, pages and documents (images etc.). This sitemap was created automatically by the plugin Yoast SEO, which I use in my WordPress installation.

wordpress sitemap yoast

Why is an XML sitemap so important?

As already briefly mentioned, it is of course not absolutely necessary for you as a WordPress user or webmaster in general to create an XML sitemap for the search engines. After all, the search engines can index your website without a sitemap. However, in this case it is not guaranteed that the crawlers will actually find all the individual pages or documents on your website.

With the help of a suitable WordPress sitemap you, as it were, facilitate the work of the crawlers. Because the sitemap lists all content to be indexed. There's still no guarantee that the search engine in question will actually index all content, however. Each search engine decides this for itself and according to its own criteria (for example, based on the quality of the content).

Below you can see what an XML sitemap for WordPress posts could look like: 

wordpress xml sitemap

The advantages of a WordPress sitemap at a glance

  • You can specifically submit all individual pages of your website
  • You can monitor the submission and indexing at Google and Bing
  • You can also submit pages that are not directly accessible
  • You make it easier for search engines to index all your pages and content

Tip: You should regularly check the XML sitemap of your WordPress website and make sure that only the content you intend to include is listed. This is because the sitemap is visible to every user. If, for example, content has not been excluded here that is not (or not "yet") intended for the public, it can be accessed via the sitemap. 

You can exclude individual pages or postsfrom indexing directly in the Gutenberg editor using SEO plugins such as Yoast or Rank Math.

indexing rankmath

How to create a sitemap in WordPress

To create a sitemap in WordPress you don't have to have any special knowledge. There are a lot of useful Plugins available for you. Today I would like to show you two of the most popular SEO-Plugins - Yoast SEO and Rank Math - as well as illustrate in a few steps how simple the creation of the XML sitemap is. 

The good news right from the start: Both plugins create a sitemap for you during the installation, completely automatically. All you have to do is decide which content should be included in or excluded from the sitemap. 

Yoast vs Rank Math

If you want to learn more about both Plugins Yoast SEO and Rank Math, I recommend you read the article "WordPress SEO-Plugins" by Dominik Stein.

Yoast SEO

yoast wordpress sitemap

The Yoast SEO Plugin is available in a free and paid version. For the creation of a sitemap and all basic settings for search engine optimization, the free version is completely sufficient. 

In the Yoast SEO settings, you can enable or disable the creation of XML sitemaps under GeneralFeatures. By default, this option is set to "On".

yoast sitemap

Under the item "Taxonomies" (post types) you can define which content or pages are listed by Yoast SEO in the XML sitemap. This includes categories, keywords and formats. 

Under Appearance in SearchTaxonomies, you can select these post types or exclude them from appearing in search results. 

WordPress Sitemap

As a rule, it's always recommended to exclude categories and other special formats from the search results. Quite simply to avoid "duplicate content". 

Rank Math

wordpress sitemap rankmath

The SEO Plugin Rank Math is also available free of charge and is mainly used for the search engine optimization of your websites. In addition to the numerous functions, you will also find settings for the XML sitemap. 

Under the menu item Sitemap SettingsGeneral you can choose from all setting options. Just like with Yoast, you can define which content should be listed in the sitemap and which should not. In addition, you will find a direct link here, which you can use to call up your sitemap. 

wordpress sitemap

With Rank Math, it's also possible to exclude individual taxonomies (post types) from being listed in the WordPress sitemap with just a few clicks (categories, keywords). To do this, simply turn the corresponding slider on or off. 

wordpress sitemap

In addition, you have the option to exclude posts, pages, and shortcodes as a rule under the item "post types". However, you should only ever exclude posts and pages in individual cases and as needed because his type of content should usually always be included in an XML sitemap. 

Important to know

The path to the sitemap can be different depending on Plugin, which you use for the generation. With Yoast SEO and Rank Math the paths are the same. This means you can access your WordPress sitemap via the following path: https://DEINE-URL/sitemap_index.xml

XML sitemap feature in WordPress 5.5

The major update to WordPress 5.5 has brought a sitemap feature into WP Core. To create a basic sitemap, you no longer need a separate pluginas of WP 5.5. However, the new integrated sitemap feature does not offer an interface to make further settings, such as excluding certain postsor pages. For more complex requirements, plugins will continue to offer the appropriate solutions. More information about the new feature can be found on the official WordPress blog.

Submit your WordPress websitemap to Google and Bing

Once you have created your XML sitemap as described above, you can submit it directly to Google and Bing. This has the advantage that you can monitor the indexing status of your website at any time and view the corresponding statistics. 

Google Search Console

sitemap

In Google, you can submit your sitemap via the Google Search Console. Once you have verified your site , you need to click on the item "Sitemaps", which you can find under Index. 

google sitemap

All you have to do is enter the path to your sitemap and then click on the "submit" button. It can take several days for the submission to be checked and until you're able to view the statistics. 

In the example above you can see the submitted sitemap for my blog. By clicking on the "Diagram icon" you can see detailed statistics. If there were problems with indexing one or more URLs, for example, it would be displayed here.

wordpress sitemap

Bing Webmaster Tools

bing sitemap

In the Webmaster Console of Bing you also have the possibility to submit your sitemap. To do this, you have to submit your website, just like in the Google Search Console. Afterwards, you can submit or submit the sitemap under the item "Sitemaps", which you can find directly on the dashboard. 

bing sitemap

With one click on the button "Submit sitemap" you can enter the corresponding path and confirm it by clicking on the button "Submit". 

bing sitemap

After the WordPress websitemap has been processed successfully, you'll also have an overview of your site in Bing Webmaster Tools in the form of statistics or website activity. 

bing sitemap

Conclusion

Although creating a sitemap isn't mandatory, it's still beneficial to submit one to at least the most important search engines like Google and Bing for the reasons mentioned above. This way you always have control over your site and have access to useful statistics. 

With the help of the two plugins mentioned above, you'll complete the entire task within a few minutes. Even beginners in this field should have no problem finding their way around. 

To make sure that nothing goes wrong in the long run, you should check your sitemap at regular intervals to any find faulty URLs or exclude URLs not intended for everyone from indexing. 

Do you have any further questions or feedback?

Feel free to use the comment function. You want to be informed about new articles on WordPress , Online Marketing & Co. Then follow us on Twitter, Facebook or via our newsletter.

Did you like the article?

Your rating helps us improve our future content.

A Comment on "How to create an XML sitemap in WordPress: benefits, plugins & webmaster tools"

  1. Thanks for this content.

    One question: Where should I put the filter? Everyone on the internet gives the filter, but not where it should be added. Or perhaps I’m simply stupid and missing something.

    Thank you.

Post a comment

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