X

How to Create an XML Sitemap in WordPress

Sitemaps allow website owners to inform search engines where all their content is located. This helps search engines crawl your website more effectively. In this tutorial, I will show you how to create an XML sitemap in WordPress using two popular plugins: WordPress SEO and Google XML Sitemaps. Both plugins can create an XML sitemap out of the box. However, I will show you all configuration options to give you a better understanding of how to customize your sitemap.

Note that there is a difference between XML sitemaps and HTML sitemaps. XML sitemaps are designed for search engines and are not intended to be seen by humans. An HTML sitemap provides an A to Z listing of all content on a website. This is why it is sometimes known as a site index.

How to Create an XML Sitemap in WordPress Using WordPress SEO

WordPress SEO is the complete website optimization plugin. It comes bundled with many goodies, and one of them is the ability to create sitemaps. To create an XML sitemap with WordPress SEO, the first thing you need to do is install and activate the WordPress SEO by Yoast plugin (Here is how to install a WordPress plugin).

To enable the sitemap feature in WordPress SEO, you need to go to SEO » XML Sitemaps and check the box next to XML sitemaps to enable this feature.

Enabling XML sitemaps feature in WordPress SEO plugin

In addition to automatically Google and Bing whenever new content is added to your website, you can update Yahoo and Ask too.

Advanced settings for WordPress SEO

Specific post types and taxonomies can be removed from your sitemap. You can also change the number of pages that are listed on a sitemap page.

Your sitemap will be created after saving your sitemap settings for the first time.

WordPress SEO divides your content into different sitemaps such as posts, pages and categories

Example of WordPress SEO Sitemap

Each corresponding sitemap page lists all of your links. Information is displayed such as how often the sitemap should be checked by search engines and the last time the post or page was updated.

Example of WordPress SEO Sitemap

If you are already using WordPress SEO, it is worth using the plugin to create your sitemap. Note that it does not offer a huge number of options. This makes it a great choice for people who just want a sitemap to work perfectly after activating. If you need more control over how your sitemap is created, you may want to consider Google XML Sitemaps instead.

How to Create an XML Sitemap in WordPress Using Google XML Sitemaps

First thing you need to do is install and activate the Google XML Sitemaps plugin. Upon activation, go to Settings » XML Sitemap to configure the plugin.

One thing that you would immediately notice is that Google XML Sitemaps plugin has a lot more options to fine tune your sitemaps than WordPress SEO. These options may look complicated and scary to new users, but they are really not. In fact, the plugin works out of the box, even if you don’t change any settings and simply click on the Update Options button at the bottom, then it will work just fine.

However, we will still walk you through the options on the settings screen.

First you need to check the box to notify search engines when you update your WordPress site. Under the Basic Settings> section check the boxes next to Google and Bing search engines.

Basic settings for Google XML Sitemaps plugin

Google XML Sitemaps allows you to add additional non-WordPress pages to your sitemaps. Simply click on the Add New Page link under the Additional Pages section to enter the URL of your non-WordPress static pages.

Add non-WordPress pages to your XML Sitemaps

Another great feature of Google XML Sitemaps plugin is that it allows you to set post priority based on their comment count or average comment count. By default it is set to comment count, you can disable the automatic priority calculation if you want.

Calculating post priority in XML Sitemap

You decide what content you want to be included into your sitemaps. By default, the plugin includes your WordPress posts, pages, homepage, with last modification times. You can also add your category, tags, and archive pages if you want.

Include or exclude content from your XML Sitemaps

You can also choose to exclude content you don’t want to be added into your sitemaps. This includes your categories, and individual posts, pages, or custom post types.

Exclude content from your sitemaps

Once you are done going through your XML Sitemaps settings, simply hit the Update Options button to save your settings.

Google XML Sitemaps automatically rebuilds your XML sitemaps whenever new content is published on your website. By default, your sitemap will be saved in the top level of your WordPress installation with the filename “sitemap.xml”. Once you have configured all settings, you can check that your sitemap has been created correctly by visiting the url http://www.example.com/sitemap.xml (replace example.com with your own domain name).

Google XML Sitemap Example

The final sitemap file that WordPress SEO and Google XML Sitemap generates are almost identical. There is no real benefit of using one over the other. Google XML Sitemap is the better option if you want to customise your sitemap though both plugins work great out of the box for search engine optimization (SEO).

I hope this article helped you create an XML sitemap in WordPress.

If you liked this article, then join ThemeLab on Twitter and Google+.

Comments  Leave a Reply

  1. Im using Google sitemap generator 4.0.7 on http://www.brightverge.com . search this plugin on wordpress.org and install with easy steps all settings are default. i strongly recommend this wp plugin.

  2. Shalin Siriwaradhana June 4, 2014 at 12:06 am

    The tutorial is clear except for one thing. Will this yoast plugin update the pages that are newly added to a website? or do we have to use a sitemap software like creately?

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!