Choose which URLs to include
List public URLs that you want indexed and that represent the preferred version of the content. Leave redirects, missing pages, noindex URLs and duplicate filter variations out. For a large store, grouping products and collections into child sitemaps can make troubleshooting easier.
1. Define the URLs you want discovered
An XML sitemap is a file that lists preferred public URLs for crawlers. Start with the URL inventory from your CMS or an export from a site crawl. Confirm each important address is on the production domain, returns a successful response, and represents a page you want in search. Cross-check the rendered canonical and any noindex directive. Avoid URLs with tracking parameters, internal search results, staging links and filtered variations that merely reproduce another page.
A sitemap supports discovery on a new site, a large catalogue or a site with specialised content. It does not replace links visitors can follow from category and service pages. If a sitemap contains important pages that navigation cannot reach, add a useful link in the relevant section of the site. Keep redirected or intentionally retired URLs out of the ongoing production sitemap, and map replacement pages separately during migrations.
- Filter the inventoryKeep the preferred public URLs
- Check the fileOpen the XML on the production host
- Verify discoveryRead the sitemap report and inspect sample pages
Generate and inspect the XML
Use your CMS output if it reflects the desired indexable URLs. Check that entries use absolute URLs on the correct host and that important pages return a successful response. Supply a last-modified date only if it reflects meaningful changes to the page.
2. Generate the file and check the response
On a managed platform, check the public sitemap it already generates before adding a plugin or a second generator. On a custom site, generate the file from the same published inventory that powers your routes. Write UTF-8 XML with the sitemap namespace and absolute URLs inside loc elements. Escape XML special characters. Use lastmod only when it represents a meaningful content, structured data or link update. Do not reset every entry’s date every time the site deploys.
An XML sitemap may contain up to 50,000 URLs or 50 MB uncompressed. If you exceed either limit, split the pages into smaller files and publish a sitemap index. Separating products, categories, articles and local pages can make it easier to spot a broken generator or unexpected URL count. Open the XML on the production host in a private window and check that the server returns the file rather than a login screen, branded error page, or cached preview sitemap.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.example.com/services/</loc>
<lastmod>2026-10-29</lastmod>
</url>
<url>
<loc>https://www.example.com/contact/</loc>
</url>
</urlset>Submit and monitor the result
Open the live sitemap and submit it through Search Console. Review the fetch status, then inspect a sample of important pages. Sitemap inclusion supports discovery, while internal links and page quality still matter. If URLs are missing after a migration, verify the new sitemap is being generated from the production site.
3. Submit and diagnose Google’s sitemap report
Verify the correct property in Search Console. Open Sitemaps, enter the sitemap path or URL as requested, and submit. If you use a sitemap index, submit that index and monitor its child files. You can also publish the full sitemap URL in robots.txt. In Bing Webmaster Tools, select the site and use its Sitemaps page if you want to report the same public file to Bing.
If Google reports Couldn’t fetch, test the exact path and host outside an authenticated session. Check HTTP status, security rules, and whether a CDN returns HTML or a challenge instead of XML. For parsing errors, inspect namespace, encoding and malformed links. A Success status confirms processing of the sitemap. If individual URLs are missing from the index, see what URL Inspection says about a few representative pages before changing the XML again.
Illustrated interface walkthrough with example data. Labels and available options may vary by account.
- Add a new sitemap
- Property
- https://www.example.com/
- Sitemap path
- sitemap.xml
For a URL-prefix property and sitemap on the same host, enter the relative path if Search Console displays the prefix.
- Submitted sitemaps
- Example status
- Success
- Next check
- Inspect an important page from the sitemap
Successful processing confirms Google could read the file. Inspect individual URLs to see what Google indexed.
A store migration sitemap example
An online store consolidates its catalogue from two domains. Before launch the team records the preferred URLs and creates server-side redirects for old pages with equivalent replacements. The production sitemap then lists the new category and product URLs only. After publishing, the team verifies that the new property can fetch the sitemap and samples a product, collection, and help article in URL Inspection.
The team sets a baseline for submitted URLs by page type. If product submissions fall by half while the product inventory stays stable, it checks the generator’s filters and hosting cache before asking whether Google has chosen to index fewer pages. Different symptoms call for different checks.
| URL type | Include? | Reason |
|---|---|---|
| Canonical public category page | Yes | Returns a successful response and represents an intended entry point |
| Redirected legacy product URL | No | List the live replacement if it is indexable |
| Tracking or duplicate filter URL | Usually no | List the preferred version unless the filter is a distinct page deliberately built for search |
| Private, error or noindex page | No | You do not want this page discovered as a sitemap candidate for indexing |
| Distinct translated page | Yes, if indexable | Give each language its own stable URL and align alternate-language signals when applicable |
Common questions
Is sitemap.xml the same thing as robots.txt?
No. The sitemap lists URLs you want discovered. Robots.txt describes crawl permissions and can point crawlers to the sitemap. A robots.txt block alone is not a reliable way to prevent indexing.
Should I resubmit the same file after every edit?
Keep the same address and regenerate the contents when the published inventory changes. Monitor the read status and fix failures; repeated submission does not make pages rank faster.
Do small sites need a sitemap?
A well-linked small site can be discoverable without one. A sitemap is useful after launch or a migration and makes your intended URL set easier to inspect.
Does every URL in a successful sitemap get indexed?
No. Crawlers use it as a discovery hint. Check page accessibility, canonical selection, and the page’s unique purpose when an important URL stays unindexed.
What to check next
- URL listPublic canonical pages only
- XML responseReachable at the submitted HTTPS address
- After releaseInspect representative product and service URLs




