With an XML Sitemap, you help search engines understand the structure of your WordPress website in an easy way. You make it easier for crawlers to work with your site and you decide which content should be indexed by Google & Co. This article explains the long-term advantages of creating a sitemap, two useful WordPress plugins to help you and how to submit an XML sitemap.
What is a sitemap anyway?
When we're talking about the so-called "sitemap" of your WordPress website, we usually mean the XML sitemap. The acronym XML stands for "Extensible Markup Language". Put simply, it is a language for exchanging hierarchically structured data in the form of a text file.
The XML sitemap thus displays all URLs, or rather a list of all URLs (individual pages, documents). The main purpose of this list is that it can be read in an automated way. To be more precise, the search engine crawlers 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 sitemap 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.
Why is an XML sitemap so important?
As mentioned above, as a WordPress user or generally as a website operator, you're not obligated to create an XML sitemap for search engines. After all, search engines can index your website without a sitemap. Without an XML sitemap, however, the crawlers might not find all the individual pages or documents on your site.
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:
Benefits of a WordPress sitemap
- You can submit all the individual pages of your website
- You can monitor submission and indexing on 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 review the XML sitemap of your WordPress site and check to make sure that only the content you've chosen to list is actually listed. The sitemap is visible for every user. If, for example, content has been included here that is not (or "not yet") intended for the public, it can be accessed via the sitemap.
You can exclude individual pages or posts from indexing with the help of SEO plugins like Yoast or Rank Math directly in the Gutenberg editor.
How to create a sitemap in WordPress
You don't need to posess any expert knowledge to create a sitemap in WordPress. There are plenty of useful plugins out there to help you. Today, I'd like to show you two of the most popular SEO plugins,Yoast SEO and Rank Math, and illustrate how easy it is to create an XML sitemap in just a few steps.
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 much more about the two plugins Yoast SEO and Rank Math, I recommend the article "WordPress SEO plugins" by Dominik.
The Yoast SEO plugin is available in a free or paid version. The free version is sufficient for creating a sitemap and for all basic SEO settings.
You can enable or disable the creation of XML sitemaps in theYoast SEO settings under General → Features. By default this option is set to "on".
Under the item "Taxonomies" (post types), you can define which content or pages should be listed by Yoast SEO in the XML sitemap. This includes categories, keywords, and formats.
Under Display in search → taxonomies,you can select these post types or exclude them from being displayed in the search results.
As a rule, it's always recommended to exclude categories and other special formats from the search results. Quite simply to avoid "duplicate content".
The SEO plugin Rank Math is also available free of charge and is mainly used for the search engine optimization of your website. In addition to numerous functions, you will also find settings for XML sitemaps.
Under the menu item Sitemap settings → General, you can choose from all the setting options. Just like with Yoast, you can determine which content should be listed in the sitemap and which should be left out. You'll also find a direct link here, which you can use to access your 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.
In addition, you have the option to exclude posts, pages and shortcode as a general 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 which plugin you used to create it. For Yoast SEO and Rank Math the paths are the same. This means you can access your WordPress sitemap via the following path: https://YOUR-URL/sitemap_index.xml
XML sitemap feature in WordPress 5.5
The next major update to WordPress 5.5 will bring a sitemap feature to the WordPress core files. This means that from WordPress 5.5 onwards you won't need a separate plugin to create a basic sitemap. The new integrated sitemap feature does not, however, provide an interface to make further settings, for example to exclude certain posts or pages. For more complex sitemap requirements, additional plugins will continue to provide the best solutions. More information about the new feature can be found on the official WordPress blog.
Submit your WordPress sitemap 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.
In Google, you can submit your sitemap in the Google Search Console. Once you've verified your site, click on the "sitemaps" option under Index.
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.
Bing Webmaster Tools
In Bing Webmaster Tools you also have the option to submit your sitemap. As with the Google Search Console, you first need to verify your website. Once this step is completed, you can submit the sitemap directly on the dashboard under the item "Sitemaps".
With one click on the button "Submit sitemap" you can enter the corresponding path and confirm it by clicking on the button "Submit".
After the WordPress sitemap 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.
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 have control over your site at all times and also 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.