Key takeaways
- An XML sitemap lists the important, indexable pages on your site so search engines can find them more easily.
- Most platforms create one automatically; your job is to check it lists the right pages and nothing broken.
- Submit it in Google Search Console and Bing Webmaster Tools, then watch the reports for errors.
An XML sitemap is a file that lists the pages on your website you want search engines to find and index. To create and submit one, check whether your platform already generates it, make sure it lists only live, indexable pages, then submit its address in Google Search Console and Bing Webmaster Tools.
A sitemap does not guarantee rankings or even indexing, but it helps search engines discover pages, especially on new sites, larger sites and sites with pages that are not well linked internally. This guide explains what a sitemap should contain, how to find or create one on common platforms, how to check it and how to submit it. Search engines and platforms update their tools regularly, so check Google Search Central and your platform help pages for the current details.
What an XML sitemap is
An XML sitemap is a machine-readable list of URLs, usually found at an address such as yourdomain.co.uk/sitemap.xml. It is written for search engines, not people. Each entry contains a page address and can include extra information such as when the page was last changed.
Larger sites often use a sitemap index, which is a sitemap of sitemaps. For example, one file might list separate sitemaps for pages, blog posts, products and collections. This keeps each file manageable and makes it easier to spot problems in one section.
| Type | What it lists | Who needs it |
|---|---|---|
| Standard XML sitemap | Page URLs | Almost every website |
| Sitemap index | Links to several sitemaps | Sites with many pages or content types |
| Image sitemap entries | Images on pages | Image-heavy sites, if images matter for search |
| Video sitemap entries | Video details | Sites hosting their own video content |
| HTML sitemap | A page of links for visitors | Optional, mainly a usability aid |
What should and should not be in your sitemap
A good sitemap is a clean list of the pages you actually want to appear in search. Search engines may treat it as a hint about which URLs matter, so filling it with junk works against you.
| Include | Leave out |
|---|---|
| Home page, service pages, product and category pages | Pages marked noindex |
| Blog posts and guides | Redirected URLs |
| Location pages | Pages returning errors |
| The final, canonical version of each URL | Duplicate or parameter versions of pages |
| Key information pages such as contact and about | Thank-you pages, basket, checkout and account pages |
If you have thin pages such as empty tag archives, consider whether they should be indexed at all. A website content audit helps you decide which pages to keep, improve, merge or remove.
How to create an XML sitemap on common platforms
Most modern website platforms generate a sitemap automatically. Your first step is usually to find it rather than build one.
WordPress
WordPress has a built-in sitemap feature, and many SEO plugins replace it with their own, often more configurable, version. If you use an SEO plugin, check its settings for which content types and taxonomies are included. Try visiting /wp-sitemap.xml or /sitemap_index.xml on your domain, depending on your set-up. Tidy URL structure helps too; see our guide to WordPress permalink settings.
Shopify
Shopify generates a sitemap automatically at /sitemap.xml, including products, collections, pages and blog posts. You cannot usually edit the file directly, but hiding pages from search or removing unwanted content affects what appears. Our Shopify SEO guide covers other settings worth checking.
Squarespace and Wix
Both platforms generate sitemaps automatically. Check the platform help pages for the address and for settings that hide pages from search.
Custom or static sites
On a custom-built site, a developer can generate the sitemap as part of the build process so it updates whenever pages change. Avoid hand-written sitemaps that are easily forgotten when new pages are added.
How to create and submit an XML sitemap to Google
Once you know your sitemap address and are happy with what it contains, submit it.
- Open your sitemap address in a browser and check it loads without errors.
- Click through a sample of URLs to confirm they load, are not redirected and are the versions you want indexed.
- Sign in to Google Search Console and open your property. If you have not set it up, follow our Search Console set-up guide.
- Go to the sitemaps report, enter the sitemap address and submit it.
- Check back after a few days to see whether Google could read it and how many URLs it discovered.
- Repeat the process in Bing Webmaster Tools, which also supports importing sites from Search Console.
- Add a line to your robots.txt file pointing to the sitemap, if your platform allows it, so other crawlers can find it too.
Checking your sitemap for problems
After submission, the reports in Search Console are where most issues show up. Look for:
- Could not fetch: the sitemap address is wrong, blocked or returning an error.
- URLs not indexed: listed pages that Google has crawled or discovered but not indexed. The page indexing report gives reasons.
- Submitted URL has noindex: a page is in the sitemap but tells search engines not to index it.
- Redirects and errors: listed pages that redirect or return 404 errors.
- Old URLs: pages from a previous version of the site still listed.
A crawl with an SEO tool can compare the pages in your sitemap with the pages linked on your site, which shows orphan pages and missing entries. This is part of the checks in our technical SEO audit checklist.
Sitemaps during a redesign or migration
When you relaunch a website, the sitemap should list the new URLs only. Old URLs should redirect to their new equivalents, rather than appearing in the new sitemap. Submitting the new sitemap promptly helps search engines find the new structure. Our guide to website redirects when relaunching explains how to map old pages to new ones, and our SEO migration checklist covers the wider process.
Common sitemap mistakes
| Mistake | Effect | Fix |
|---|---|---|
| Staging or test pages listed | Unfinished pages may be found | Remove and block the staging site |
| Both http and https or www and non-www versions | Mixed signals about the main version | List only the canonical version |
| Sitemap not updated after changes | New pages discovered slowly | Use automatic generation |
| Sitemap blocked in robots.txt | Search engines cannot read it | Allow access to the file |
| Hundreds of thin tag or filter pages | Crawl attention spent on low-value URLs | Exclude or noindex them |
Do small websites need a sitemap?
If your site has a handful of pages that are all linked from the main menu, search engines will probably find them without one. A sitemap still does no harm, takes little effort on most platforms and gives you useful reports in Search Console. For anything with a blog, a shop or location pages, it is well worth having.
A simple sitemap routine
Once your sitemap is submitted, it needs very little attention, but a short routine catches problems early:
- After adding a batch of new pages, open the sitemap and confirm they appear.
- Once a month, glance at the sitemaps and page indexing reports in Search Console for new errors.
- After installing or changing an SEO plugin or theme, check the sitemap address has not changed.
- After deleting products or pages, confirm they have dropped out of the sitemap and that sensible redirects are in place.
- Before and after a redesign, save a copy of the sitemap so you have a record of the old URLs.
Keeping that saved list is especially useful, because it gives you a complete record of what existed before any big change and makes redirect planning much easier.
Getting help
Sitemaps are a small part of technical SEO, but problems with them often point to bigger issues with indexing, redirects or duplicate content. Our SEO and GEO service includes technical checks like these, and if your sitemap problems stem from how the site is built, our website and ecommerce development service can fix the underlying set-up.
FAQs
How do I create and submit an XML sitemap?
Check whether your platform already generates one, usually at /sitemap.xml. Make sure it lists only live, indexable pages, then submit the address in the sitemaps report in Google Search Console and in Bing Webmaster Tools.
Where do I find my website sitemap?
Try /sitemap.xml, /sitemap_index.xml or /wp-sitemap.xml on your domain. Your robots.txt file may also list it, and your platform help pages will confirm the address.
Does a sitemap help my website rank?
Not directly. It helps search engines discover and understand which pages you want indexed. Rankings still depend on content quality, relevance, links and technical health.
How often should my sitemap update?
Ideally automatically, whenever pages are added, changed or removed. Most platforms handle this for you, so you rarely need to resubmit unless the sitemap address changes.
Why are pages in my sitemap not indexed?
Common reasons include noindex tags, redirects, duplicate content, thin pages or Google choosing not to index them yet. The page indexing report in Search Console lists the reason for each group of URLs.
Should I include images in my sitemap?
Image entries can help if image search matters to your business. Many platforms include image details automatically. For most service businesses, a standard page sitemap is enough.