What Is a WordPress Sitemap?
A WordPress sitemap is an XML file that lists every URL on a website that should appear in search results.
An XML sitemap helps search engines crawl a website more efficiently.
A typical XML sitemap might look like this:
As of WordPress version 5.5, WordPress will automatically generate a basic sitemap.
To access this sitemap, add "/wp-sitemap.xml" to the website address. For example:
https://www.yourdomain.com/wp-sitemap.xml
This WordPress sitemap URL updates each time you publish or update a page.
However, the default XML sitemap only provides basic functionality. Many WordPress site owners use a plugin to create a more robust and customizable sitemap.
WordPress XML vs. HTML Sitemaps
XML sitemaps are designed for search engines, not human visitors. Users can’t see them when they browse your site.
HTML sitemaps are designed for human visitors. These sitemaps consist of webpages that display a hierarchical list of selected pages on your site. They function like a table of contents and help users navigate your content.
Below is an example of a typical HTML sitemap:
Why Are Sitemaps Important for WordPress Websites?
Sitemaps are important for WordPress websites because they help search engines find and index the website’s URLs.
Sitemaps also make crawling more efficient and show when pages have been updated, allowing search engines to understand your site’s structure.
While not strictly required, using an XML sitemap is a technical SEO best practice. It’s especially useful for WordPress sites with complex structures that include many posts, pages, or custom post types.
A sitemap is particularly helpful if:
- Your site is new and has few backlinks
- Your site has many pages (500-plus)
- Your site features numerous images or videos
- Your internal linking isn’t strong
Even if these conditions don’t apply, a sitemap can still provide extra details for search engine crawlers. For example, it can show when you last updated a page or list available language versions of your content.
By default, WordPress provides a basic XML sitemap. However, using a plugin offers more customization and additional features. We’ll explain how to do this next.
How to Create a WordPress XML Sitemap with a Plugin
You can create a WordPress XML sitemap using a dedicated plugin. There are two main categories of WordPress sitemap plugins:
- All-in-one SEO plugins
- Specialized sitemap plugins
Two popular options in these categories are Yoast SEO and XML Sitemap Generator for Google. This guide will explain how to generate a sitemap in WordPress using both plugins.
Generating a Sitemap with the Yoast SEO Plugin
Yoast SEO is a well-known all-in-one SEO plugin that also creates an XML sitemap.
To install Yoast SEO, open the WordPress dashboard and select “Plugins” > “Add New.” Search for “Yoast SEO” and click “Install Now.” Then click “Activate.”
Open Yoast SEO settings and locate the “XML sitemaps” section. Click “View the XML sitemap” to see your new WordPress sitemap in a new tab.
You can also view the sitemap by appending “sitemap_index.xml” to your domain: yourdomainname.com/sitemap_index.xml
This sitemap includes multiple sitemaps for different content types. By default, Yoast SEO creates separate sitemaps for posts and pages.
Below is an example of a post sitemap:
The Yoast SEO plugin follows established sitemap best practices:
- It adds a link to the XML sitemap in the robots.txt file
- It splits large sitemaps into smaller ones and links them in a sitemap index (for example, separate sitemaps for pages, posts, and categories)
- It includes image information in the sitemap
- It adds a “lastmod” date for each URL, indicating the most recent update
- It automatically removes “noindex” pages from the sitemap
Generating a Sitemap with the ‘XML Sitemap Generator for Google’ Plugin
The XML Sitemap Generator for Google plugin is another free and simple option for creating a WordPress XML sitemap.
After installing the plugin, it immediately generates the sitemap.
To adjust settings, go to “Settings” > “XML-Sitemap.” The default settings are generally sufficient, but you can modify them if needed.
To view the sitemap, click the link at the top of the plugin’s settings page.
The sitemap URL will be https://yourdomain.com/sitemap.xml.
Below is an example of what the sitemap looks like:
How to Submit Your WordPress XML Sitemap to Search Engines
After setting up your sitemap, submit it to Google and Bing. This step is optional, but it can help search engines discover and crawl your site more quickly.
Submitting Your Sitemap to Google
- Log in to your Google Search Console account.
(If you don’t have an account, see the Google Search Console guide for instructions.) - In the left menu, click on “Indexing” and then select “Sitemaps”
- Enter the URL of your sitemap and click “Submit.”
Google may take several days to process your sitemap. When indexing finishes, the "Sitemap" report will show a green "Success" status.
If you’re using the default WordPress sitemap or a plugin-generated sitemap, you shouldn’t encounter issues. If Google finds errors, follow the on-screen instructions to fix them.
Submitting Your Sitemap to Bing
- Log in to your Bing Webmasters Tools account
- In the left sidebar, select “Sitemaps”
- Click “Submit sitemap”
- Enter the URL of your sitemap and click “Submit”
Bing may also take a few days to process your sitemap. Once it finishes, you’ll see a "Success" status.
How to Check Your WordPress XML Sitemap
To confirm that your WordPress sitemap works correctly, use a website crawler such as Semrush’s Site Audit tool.
After the crawl finishes, the tool will alert you. Go to the “Issues” tab to see a list of all detected site errors.
Type “sitemap” into the search bar. Site Audit will highlight any sitemap-related errors and categorize them by priority.
Some common sitemap issues include:
- Sitemap not detected
- Sitemap format errors
- Sitemap contains incorrect pages
- Sitemap file is too large
If you find a sitemap issue, click the “Why and how to fix it” link. This provides an explanation and recommended solutions.
To learn more about improving the technical health of your site, review our technical SEO audit guide.
Make Your WordPress Website Easy to Crawl for Search Engines
Search engines will eventually find and index your pages on their own.
However, you can help them discover and crawl your pages faster by providing an XML sitemap with current URLs from your WordPress site.
Choose from several free or paid WordPress sitemap plugins to generate your sitemap. After creating one, test it using Semrush’s Site Audit. Sign up now for a free trial.