An XML sitemap is a file that lists the important URLs on your website so search engines can find and crawl them more efficiently. Think of it as a map you hand to search engine crawlers, showing them which pages exist and when they were last updated. While search engines can discover pages through links, a sitemap helps make sure nothing important is missed, especially on new sites, large sites or sites with weak internal linking.
This guide explains how XML sitemaps work, what to include, how to create one in WordPress and how to submit and monitor it in Google Search Console.
What an XML Sitemap Contains
A sitemap is written in XML format. For each URL, it can include:
| — | — | — |
|---|
Google has said it uses lastmod when it is consistently accurate, but generally ignores changefreq and priority. Focus on listing the right URLs with correct last-modified dates.
Does Every Website Need a Sitemap?
Small sites with good internal linking may be crawled fine without one, but a sitemap is easy to create and offers useful benefits:
- Faster discovery of new and updated pages
- Better crawling for large sites with many pages
- Support for new sites with few backlinks
- Help for pages that are not well linked internally
- Useful reporting in Search Console about submitted versus indexed pages
Types of Sitemaps
- Page sitemaps: list standard pages and posts.
- Image sitemaps: help search engines discover images.
- Video sitemaps: provide details about video content.
- News sitemaps: for publishers in Google News.
- Sitemap index files: a master file that links to several smaller sitemaps.
Most WordPress SEO plugins create a sitemap index that links to separate sitemaps for posts, pages, categories and sometimes authors.
Sitemap Limits
A single sitemap can contain up to 50,000 URLs or be up to 50 MB uncompressed. Larger sites split URLs across multiple sitemaps listed in a sitemap index file. Plugins handle this automatically.
What to Include and Exclude
| — | — |
|---|---|
| Product and service pages | 404 and error pages |
Your sitemap should reflect the pages you genuinely want indexed. Listing noindexed or redirected URLs sends mixed signals.
How to Create a Sitemap in WordPress
Built-in WordPress sitemap
Since version 5.5, WordPress automatically generates a basic sitemap at /wp-sitemap.xml. It includes posts, pages, categories and authors.
SEO plugin sitemaps
SEO plugins usually replace the default sitemap with a more flexible version, often at /sitemap_index.xml. You can choose which post types and taxonomies to include, exclude specific pages and automatically remove noindexed content. Make sure only one sitemap system is active to avoid confusion.
Manual sitemaps
For non-WordPress sites, sitemap generator tools can crawl your site and create a file to upload to your server. Many website builders also generate sitemaps automatically.
How to Submit Your Sitemap
Google Search Console
- Open Search Console and select your property
- Go to Indexing, then Sitemaps
- Enter the sitemap URL, for example sitemap_index.xml
- Click Submit and check that the status shows success
Bing Webmaster Tools
Add your site, go to Sitemaps and submit the same URL. Bing can also import your settings from Google Search Console.
Robots.txt reference
Add a line to your robots.txt file pointing to your sitemap, for example “Sitemap: https://example.com/sitemap_index.xml”. This helps any crawler find it.
Monitoring Your Sitemap
After submission, review the Sitemaps report and the Pages report in Search Console. Compare the number of discovered URLs with the number indexed. A large gap may indicate quality issues, duplicates or technical problems worth investigating. Common sitemap errors include unreachable URLs, invalid formatting and URLs blocked by robots.txt.
Common Sitemap Mistakes
- Including noindexed, redirected or 404 URLs
- Running two plugins that both generate sitemaps
- Using inaccurate lastmod dates that change on every page load
- Forgetting to update the sitemap URL after changing plugins
- Expecting a sitemap to guarantee indexing
Does a Sitemap Guarantee Indexing?
No. A sitemap helps search engines discover URLs, but they still decide whether each page is worth indexing based on quality, duplication and other factors. If submitted pages are not indexed, focus on improving content and internal linking rather than resubmitting repeatedly.
Real-World Example
A new recipe website published fifty posts but only a handful appeared in Google after several weeks. The owner discovered that the site had no submitted sitemap and that many recipes were only reachable through pagination. After enabling the SEO plugin’s sitemap, submitting it in Search Console and adding category links to the menu, most recipes were discovered and indexed over the following weeks.
Frequently Asked Questions
Where is my WordPress sitemap?
Try yourdomain.com/wp-sitemap.xml for the default sitemap or yourdomain.com/sitemap_index.xml if you use an SEO plugin.
How often should I submit my sitemap?
Submit it once. Search engines revisit it automatically. You only need to resubmit if the URL changes.
Should I include category and tag pages?
Include categories if they are useful and indexable. Exclude thin tag archives that you have set to noindex.
Does a sitemap improve rankings?
Not directly. It improves discovery and crawling, which can help pages get indexed faster.
What does “Couldn’t fetch” mean in Search Console?
It means Google could not access the sitemap at that time. Check the URL, server response and robots.txt, then try again later.
Do I need an HTML sitemap?
An HTML sitemap is a page for users. It is optional but can help visitors navigate large websites.
Conclusion
An XML sitemap is a simple tool that helps search engines discover your important pages. Use the sitemap generated by WordPress or your SEO plugin, include only canonical and indexable URLs, submit it to Google and Bing and monitor the reports. Combined with strong internal linking and quality content, a clean sitemap supports faster, more reliable indexing.
