How to Create an XML Sitemap in WordPress

When creating a business website, you always want as much organic traffic to your site as possible. The best way to drive traffic to your site is publishing quality content and making it be easily found through search engines.

Along with providing quality content consistently, you have to make sure your web pages to be indexed and displayed on Google or Bing. You should create an XML sitemap to effectively take in all your site URLs and organize them into a map to provide for search engines.

Thanks to this sitemap, search engines can crawl, index, and add your site to SERPs. Without a sitemap, crawlers must go from page to page on your site through internal links to navigate it which takes a lot of time.

In this article, we’ll explain the importance of a sitemap and show you how to create one for your WordPress site in great detail.

Why Do You Need an XML Sitemap?

A WordPress sitemap remains highly critical for your site from the SEO point of view. Unlike metadata or backlinks, sitemaps don’t boost your site rankings directly. However, they affect the site navigation process and allow search engines to better crawl and index your website. Following are the most common usages of WordPress sitemaps:

  • Efficient Crawling – Sitemaps make it easier for Google bots and other search crawlers to better navigate your website. Instead of taking time checking every internal link, they can read a list of all your content via a well-organized sitemap in a machine-readable format.
  • Content Prioritization – You’re allowed to classify pages URL by categories and priority in your sitemap. As a result, search engines can understand which content is more important and should be crawled faster than the others.
  • No-index Pages – If one of your pages is not indexed for some reason, sitemaps will let search engines know about that page.
  • Visitor Analysis – You can utilize your sitemap and learn about your visitors via sitemap reports. They will identify errors you should fix, your site traffic sources, and potential keywords you should target. You can base on this information to improve your content and attract more users.

There are several ways to create a sitemap for your site, either generating a dynamic sitemap manually or using a plugin. If you don’t have great knowledge about XML, it’d be better using Yoast SEO.

How to Create an XML Sitemap Using Yoast SEO

Trusted by over 5 million WordPress users and receiving a 4.9-star rating, Yoast is by far the best SEO plugin. While the plugin primarily helps with search engine optimization like such metadata and keyword density, you can also use it to create a sitemap.

You can get the plugin for free on the WordPress repository. These 6 steps show you how to install the plugin and create a sitemap for your WordPress site.

  1. Go to Add New under Plugins in your WordPress admin dashboard
  2. Type “yoast seo” in the keyword box to search for the plugin
  3. Install and activate the plugin
  4. Head to SEOGeneral and click on the Features tab
  5. Find the XML sitemaps option and turn it on
  6. Save your changes

How to Find a Sitemap in WordPress

To make sure your site has an XML sitemap, in Yoast SEO Features settings page, click on the question mark next to the XML Sitemaps option. Then, go to the See the XML sitemap link.


Here is an example sitemap:


Another way to check your sitemap is simply adding the slug “sitemap.xml/” to your domain URL. For example,  Sometimes, this URL doesn’t work. It’s because Yoast SEO generates multiple sitemaps for different types of site content. You will have separate sitemaps for posts, pages, authors, and categories created by default. Add slugs like page-sitemap.xml, post-sitemap.xml, or author-sitemap.xml, etc. to the website domain in order to see your sitemaps for each type of content.


How to Submit XML Sitemaps to Search Engines

Search engines can look for your sitemap themselves. They will receive a notification informing the changes on your sitemaps once you publish a new page or post. Still, you should actively submit your XML sitemap to search engines to make sure that it can be found.

Submit your sitemap to Google

Google offers a free Google Search Console service helping you monitor and maintain your site presence in search results. You should add your sitemap to this tool so that Google can discover and index your content quickly.

Take these 2 steps to add your XML sitemap to Google Search Console:

Step 1: Add your website to Google Search Console

  1. Visit the Google Search Console site and sign up an account
  2. Choose the URL prefix option for easier setup
  3. Enter your site domain then hit Continue
  4. Select the HTML tag option to verify ownership
  5. Copy the code
  6. Go back to your WordPress admin dashboard and install the plugin Insert Headers and Footers. You can reference how to install a plugin in the Yoast SEO section above.
  7. Head to Insert Headers and Footers under Settings in your WordPress sidebar
  8. Paste the code in the Scripts in Header box
  9. Save your changes
  10. Return to Google Search Console ownership verification page where you’ve copied the code and hit Verify

Step 2: Add your XML sitemap to Google Search Console

  1. Visit your sitemap dashboard in Google Search Console and click on Sitemaps in the left-hand navigation menu
  2. Add the slugs of your sitemap URL to the Add new sitemap section
  3. Click Submit

Submit your sitemaps to Bing

Bing comes as the second biggest search engine in the world. Optimizing your website for Bing search significantly helps grow your traffic.

While Google offers Google Search Console, Bing provides Webmaster Tools allowing you to monitor your site in Bing search results.

To submit your sitemap to Bing, you need to:

  1. Sign up for an account in Bing Webmaster Tools
  2. Enter your site URL and click ADD under Add a Site
  3. Fill in your sitemap URL in the Add a sitemap box under ABOUT MY WEBSITE section
  4. Click Save
  5. Copy the meta tag
  6. Go back to your WordPress admin dashboard. Under Settings, choose Insert Headers and Footers
  7. Paste the code in the Scripts in Header box
  8. Save your change

Make Use of Your Sitemap

While XML sitemaps don’t help improve your WordPress site ranking directly, they greatly impact on your site SEO. Search crawlers can read the map and index your site URLs easier. You’re enabled to prioritize which content should be crawled and indexed faster.

Creating a WordPress XML sitemap manually requires you to be familiar with coding and XML. If you’re not tech-savvy, we recommend using the Yoast SEO plugin.

After creating a sitemap, you need to submit it to Google or Bing via Google Search Console and Bing Webmaster Tools.

Leave a comment below if you have any questions about how to create a sitemap for your WordPress site and submit it to search engines. Click here to learn more about how to exclude pages from the sitemap too.