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:
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.
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:
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.
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.
Yoast SEO is a well-known all-in-one SEO plugin that also creates an XML sitemap.
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:
- 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
The XML Sitemap Generator for Google plugin is another free and simple option for creating a WordPress XML sitemap.
To adjust settings, go to “Settings” > “XML-Sitemap.” The default settings are generally sufficient, but you can modify them if needed.
The sitemap URL will be https://yourdomain.com/sitemap.xml.
Below is an example of what the sitemap looks like:
- 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.”
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.
After the crawl finishes, the tool will alert you. Go to the “Issues” tab to see a list of all detected site errors.
- 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.
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.