An XML sitemap is a file that lists the important URLs on your website so search engines can discover and crawl them efficiently. Include only canonical, indexable pages that return a 200 status, keep it updated automatically (WordPress and SEO plugins do this), reference it in robots.txt and submit it in Google Search Console and Bing Webmaster Tools.
An XML sitemap is a simple list of the pages you want search engines to know about. It does not guarantee those pages will be indexed or rank, but it helps search engines discover them — especially on new sites, large sites and pages that are not well linked.
The good news is that most modern platforms create a sitemap for you. Your job is mainly to make sure it contains the right pages and that search engines know where to find it.
Why sitemaps matter
- Help search engines find new and updated pages faster.
- Especially useful for new sites, large sites and pages with few internal links.
- Show search engines which URLs you consider important (canonical).

A sitemap does not guarantee indexing — quality and internal links still matter.
Example XML sitemap
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/how-to-install-wordpress/</loc>
<lastmod>2026-11-12</lastmod>
</url>
</urlset>
Large sites use a sitemap index that links to several sitemaps (for example posts, pages and products). A single sitemap can list up to 50,000 URLs or 50 MB uncompressed.
What to include and exclude
| Include | Exclude |
|---|---|
| Important pages and posts | Noindexed pages |
| Canonical URLs only | Redirects and 404 pages |
| Useful category or product pages | Thin tag archives, internal search results |
| Accurate lastmod dates | Duplicate or parameter URLs |
Create and submit a sitemap
- Generate itWordPress creates a basic sitemap at /wp-sitemap.xml; SEO plugins such as Rank Math or Yoast create /sitemap_index.xml with more control.
- Check itOpen it in a browser and confirm it lists the right URLs.
- Add it to robots.txtAdd a line such as
Sitemap: https://example.com/sitemap_index.xml. - Submit to GoogleSearch Console → Indexing → Sitemaps.
- Submit to BingBing Webmaster Tools → Sitemaps.

Tip: Google ignores the <priority> and <changefreq> values, but uses an accurate <lastmod> date. Only update lastmod when content meaningfully changes.
Check your sitemap in five minutes
- Find itTry yoursite.com/sitemap.xml, /sitemap_index.xml or /wp-sitemap.xml.
- Open a few URLsMake sure they load and are pages you want in search.
- Look for unwanted pagesTag archives, thank-you pages, test pages or noindexed URLs.
- Check robots.txtAdd a Sitemap: line pointing to your sitemap.
- Review Search ConsoleCheck the Sitemaps report for errors and discovered pages.
Common sitemap problems
| Problem | Fix |
|---|---|
| Sitemap includes noindexed pages | Remove them, or remove the noindex if they should rank |
| Redirected URLs in sitemap | List only final destination URLs |
| HTTP and HTTPS mixed | Use your canonical HTTPS URLs only |
| Two sitemaps from two plugins | Disable one SEO plugin or its sitemap feature |
| Search Console shows “Couldn’t fetch” | Check the URL loads, is not blocked and returns valid XML |
Related: robots.txt, Search Console tutorial and technical SEO.
Frequently asked questions
Do I need an XML sitemap?
It is strongly recommended, especially for new, large or poorly linked sites. Small sites with good internal linking can be found without one, but a sitemap helps.
Where is my WordPress sitemap?
WordPress provides /wp-sitemap.xml by default. SEO plugins usually replace it with /sitemap_index.xml.
How often should I update my sitemap?
Let your CMS or plugin update it automatically whenever you publish or change content.
Should I include images in my sitemap?
Image sitemaps can help images get discovered. Many SEO plugins add image entries automatically.
Does a sitemap help a small website?
It still helps search engines discover pages quickly, and it is free and automatic on most platforms, so it is worth having.
Can I have more than one sitemap?
Yes. Large sites often use a sitemap index linking to several sitemaps for posts, pages, products and images.
Should I resubmit my sitemap after every post?
No. Search engines re-check sitemaps regularly. Submit it once and resubmit only after major changes.
Further reading: Google Search Central documentation.





