Hosting Tutorial & Guide

Why & How to Create an XML Sitemap for WordPress Sites

updated on Aug 12, 2016
Why & How to Create an XML Sitemap for WordPress Sites A sitemap refers to a list of a website's pages which are accessible to search engine crawlers and users. Sitemap falls into two groups – XML sitemap, and HTML sitemap. The former targets search engines, while the latter helps visitors navigate a website and find the content they want quickly.

Nowadays, an XML sitemap is essential to all types of websites. By creating one and submitting it properly, you can tell search engines all the available pages on your website and which pages are more important. Regardless of the size of your website, you will need an XML sitemap.
  • For the new websites, XML sitemap eliminates the difficulty for search engines to find all the pages, so that the sites can be indexed more efficiently.
  • For the popular websites, a sitemap enhances their interactions with search engines and shows the update frequency, which improves the sites' overall visibility in search engines.
Therefore, although XML sitemap doesn't affect your search engine rankings, it makes your website search engine friendly by ensuring better crawling and indexing.

Creating a good XML sitemap has been one of the best WordPress SEO practices, and in below, we will show you how. To simplify the process, we are going to introduce two popular plugins.

Create an XML Sitemap for WordPress with Google XML Sitemaps Plugin

Google XML Sitemaps is one of the best WordPress sitemap plugins. It offers a complete solution for generating an XML sitemap for the main search engines including Google, Yahoo, Bing and With the sitemap, crawlers are able to see the structure of your WordPress site efficiently.

Besides, Google XML Sitemaps supports custom URLs and all the pages generated by WordPress. And every time you add a new post or page on your site, the plugin notifies search engines about the update, so that the new content can be indexed quickly.

Create WordPress XML Sitemap with Google XML Sitemaps

As soon as you have installed the plugin, a static XML file and a zipped version (sitemap.xml and sitemap.xml.gz) are created automatically so that you don't need to deal with them manually.

What you need to do, then, is to check the plugin's settings and make the changes you want. Google XML Sitemaps comes with dozens of options for you to customize your sitemap, which you can access in Settings > XML-Sitemap.

There you are able to enable or disable the update notifications for Google and Bing. Our suggestion is to keep both search engines well notified.

Update Notification

As the plugin comes with a parameter for post priority, you can choose whether to enable priority calculation, and decide how each post's priority is calculated.

Post Priority

Scrolling the page down, you will see the options about what content to be included in the sitemap. All the standard content, custom taxonomies and custom post types on your WordPress site are listed there, so you only need to check the ones that you want. If you have no idea about the choices, just keep the default values, which should be good, too.

Below all the content types, there is an option for including the modification time. It is highly recommended to get this option checked so that search engines can know when the content on your website is changed.

Sitemap Content

If you want to exclude any category, post or page on your site from the sitemap, the plugin offers you an easy way to do this. Simply select the category/categories from the list, or enter the post/page ID in the corresponding field.

Exclude Content from Sitemap

In terms of the content priority, you can also give a value from 0.0 to 1.0 to different content types manually. Google XML Sitemaps has already entered the suggested values, while you can change them as you like.


After dealing with all the options on the settings page properly, you can update them, and then publish a new post on your WordPress site to get search engines notified about your sitemap.

Create a WordPress XML Sitemap with Yoast SEO

Yoast SEO is among the best WordPress SEO plugins. It helps you deal with many SEO related items including XML sitemaps. If you have already installed this plugin on your site, there is no need to use another sitemap solution because you can generate an XML sitemap directly with this plugin.

First of all, access the XML Sitemaps submenu under the "SEO" menu item. On the sitemap page, you have to get the sitemap functionality enabled. A sitemap will then be generated automatically.

Enable XML Sitemap in Yoast SEO

Yoast SEO offers multiple options for customizing the sitemap. For example, under the "General" tab, you can decide the maximum entries for each sitemap page. If your site has low memory, you are suggested to keep the number of entries below 500.

XML Sitemap General Settings

To make sure the sitemap works in the way you like, you'd better open the "Post Types" tab to select which post types are included in the sitemap. The standard post types and custom post types are both included by default, but you can change the settings at any time.

Post Types

Under the "Taxonomies" tab, you are able to see all the taxonomies on your site. You can choose which ones of them should be included in the sitemap.


Then, open the "Excluded Posts" tab to fill in the IDs of the posts that you want to exclude if it's necessary.

Exclude Posts or Pages

At last, save the changes. The plugin will generate an XML sitemap for your WordPress site.