WordPress Sitemap: How to Create, Check, and Submit One

Asif Ali

Aug 07, 20246 min read
Contributors: Vlado Pavlik, Lidia Infante, and Simon Fogg
wordpress sitemap
Share

TABLE OF CONTENTS

What Is a WordPress Sitemap?

A WordPress sitemap is a website file in XML format that includes a list of all URLs you want search engines to index.

The primary role of an XML sitemap is to help search engines crawl your website more efficiently. 

It looks something like this:

sitemap in xml format

Starting with version 5.5, WordPress automatically generates a basic sitemap for your website. You just have to add "/wp-sitemap.xml" to the end of your website's address. Like this:

https://www.yourdomain.com/wp-sitemap.xml

The WordPress sitemap URL also updates whenever you publish or update a page.

However, the default XML sitemap only has basic functionality. That's why many WordPress website owners opt to create a sitemap with a plugin.

Pro tip: Check your sitemap for a wide range of errors with Semrush’s Site Audit tool.

WordPress XML vs. HTML Sitemaps 

Since XML sitemaps are meant for search engines rather than users, people browsing your site will not see them.

On the other hand, HTML sitemaps are for your visitors. They're webpages that show a hierarchical list of selected pages on your site.

Think of them as a table of contents for your website that helps users navigate your content.

Here’s what a typical HTML sitemap looks like:

HTML sitemap listing links to pages

Why Are Sitemaps Important for WordPress Websites?

A sitemap helps search engines discover URLs on your WordPress site. It assists them in crawling your content and understanding when pages have been updated.

They act as a guide to your site, helping Google discover your pages faster.

It’s not mandatory, but having an XML sitemap is a technical SEO best practice. Sitemaps are especially useful for WordPress sites that have complex structures with posts, pages, and custom post types.

Having a sitemap will be extra helpful if:

  • Your site is new with few backlinks
  • You have lots of pages (500+)
  • Your site has many images or videos
  • Your internal linking isn't strong

Even if these don’t apply to your WordPress site, a sitemap can contain additional information for search engine crawlers. Like the date when the page was last updated or the available languages a piece of content is in. 

While WordPress creates a basic XML sitemap, you'll have to use a plugin if you want more control or extra features. We'll cover how to do that next.

How to Create a WordPress XML Sitemap with a Plugin

You can generate your WordPress sitemap with a WordPress sitemap plugin. There are two key categories of plugins for this:

  • All-in-one SEO plugins 
  • Specialized sitemap plugins

Two popular choices for each of these categories are: Yoast SEO and XML Sitemap Generator for Google. We'll cover how to generate a sitemap in WordPress for both.

Generating a Sitemap with the Yoast SEO Plugin

Yoast SEO is an incredibly popular all-in-one SEO plugin. It will cover many SEO basics for your WordPress website.

Yoast SEO plugin overview

Once you install the plugin, you're all set. It automatically creates your WordPress XML sitemap.

To install Yoast SEO, go to your WordPress dashboard > "Plugins" > "Add New Plugin". Search "Yoast SEO" and click "Install Now."

Steps to install Yoast plugin annotated in WordPress admin

Next, activate it by clicking “Activate.”

Yoast SEO plugin installed and Activate button highlighted

Now go to Yoast SEO settings and find the "XML sitemaps" section. Click "View the XML sitemap" to open your WordPress sitemap in a new tab.

Yoast SEO plugin APIs settings section with View the XML sitemap button highlighted

Alternatively, you can view your sitemap by appending 'sitemap_index.xml' to your domain. Like this: yourdomainname.com/sitemap_index.xml.

The sitemap will look like this:

XML sitemap index generated by Yoast showing two sitemaps

Yoast SEO breaks down your sitemap into multiple sitemaps for different types of content. (By default, there will be separate sitemaps for posts and pages.)

Here's what a detailed view of a post sitemap for WordPress looks like:

Posts sitemap generated by Yoast showing list of URLs with images and last modified date

The plugin also follows some other sitemap best practices:

  • It adds a link to your XML sitemap to the robots.txt file
  • It breaks up large sitemaps into smaller ones and links them together in a sitemap index (e.g., a page sitemap, a post sitemap, a category sitemap, etc.)
  • It puts image information in the sitemap for search engines to find and index
  • It adds a “lastmod” date for each URL that shows when the page was last changed
  • It automatically removes “noindex” pages from the sitemap. (If you don't want the page to be indexed by Google, there's no reason to have it in a sitemap.)

Generating a Sitemap with the ‘XML Sitemap Generator for Google’ Plugin

The XML Sitemap Generator for Google plugin is a free and easy option for generating an XML sitemap for a WordPress site.

XML sitemap generator for Google WordPress plugin

Once you install the plugin, it automatically creates the sitemap.

You can find the settings under “Settings” > “XML-Sitemap.”

xml sitemap settings

You’ll see many options. You don't have to change anything if you're unsure about these. The default settings will be sufficient in most cases. 

To see your sitemap, just click the link at the top of the plugin's dashboard (above the settings).

It will be located at https://yourdomain.com/sitemap.xml.

It will look like this:

XML sitemap index generated by plugin showing URLs of sub sitemaps and last modified dates

How to Submit Your WordPress XML Sitemap to Search Engines?

Once your sitemap is set up, submit it to Google and Bing. While it is not mandatory, this can speed up the process of search engine bots discovering and crawling your site. 

Submitting Your Sitemap to Google

Log in to your Google Search Console account. 

(If you don't have an account yet, follow the steps in our Google Search Console guide.)

To submit your sitemap, go to the “Sitemaps” tab. You'll find it under the “Indexing” section of the left menu.

google search console sitemaps

There, you can enter the URL of your sitemap and click “Submit.”

Google can take time (even several days) to process your sitemap. Once indexed, the “Sitemap” report should show a green "Success" status.

Submitted sitemaps table in search console with Success status highlighted

If you've used the default WordPress sitemap or a sitemap created by one of the plugins, you shouldn't encounter any issues. If Google Search Console detects any issues, follow the provided directions to fix them.

Submitting Your Sitemap to Bing

Log in to your Bing Webmasters Tools.

Go to the "Sitemaps" tab from the left sidebar menu.

Microsoft Bing Webmaster tools dashboard with SItemaps menu option highlighted

Click "Submit sitemap."

Submit sitemap button highlighted

Enter the URL of your sitemap and click “Submit.”

Sitemap URL entered and Submit button highlighted

Wait for a couple of days for Bing to process your sitemap. Once indexed, you'll see a "Success" status.

Sitemap details table with Success status highlighted

How to Check Your WordPress XML Sitemap

To ensure your WordPress sitemap is working properly, use a website crawler like Semrush's Site Audit tool.

Once your website has been crawled (the tool will alert you), go to the "Issues" tab to review all site errors in list format.

site audit issues report

Search “sitemap.” Site Audit will highlight sitemap errors categorized by priority.

site audit sitemap errors

Here are some examples of possible sitemap issues:

  • Your sitemap was not detected
  • Your sitemap has format errors
  • Your sitemap contains incorrect pages
  • Your sitemap file is too large

If any sitemap issue is detected, just click the “Why and how to fix it” link. That will help you understand the issue and give you recommendations on how to fix it.

site audit how to fix sitemap

To learn more about the overall technical health of your website, read our guide to performing a technical SEO audit

Make Your WordPress Website Easy to Crawl for Search Engines

Search engines will eventually find and index your pages. 

But you can help them discover, crawl, and index your pages faster. By giving them an XML sitemap that lists up-to-date URLs on your WordPress site.

There are several paid and free WordPress sitemap plugins you can use.

Once generated, test the sitemap to ensure it is working properly using Semrush’s Site Audit. Sign up now for a free trial.

Share
Author Photo
Asif is a content marketing specialist with over eight years of experience. While working at agencies and startups, he has helped brands drive millions in sales through full-funnel inbound marketing campaigns.
More on this