Create an XML sitemap from the public URLs you want considered for search. Check its XML and destinations, publish it where crawlers can fetch it, and submit the exact address in Search Console. Keep the file aligned with real site changes. A Success status in the Sitemaps report confirms that Google fetched and read the file, not indexing of every listed page.
The useful starting point is your site’s existing URL inventory. A generator may already publish a sitemap, but its output can still include old redirects, omit a new section or assign the build time to every page. Inspect what it emits before adding another tool.
This guide follows seven implementation steps. The Google sitemap guidance and sitemap protocol support the format and submission details; the review checks explain how to apply them to your own site.
What an XML sitemap does
An XML sitemap supplies a machine-readable list of preferred URLs, with optional information such as modification dates. It helps search engines learn about those addresses. It does not override crawl restrictions, resolve conflicting canonical choices or ensure that a page will be indexed.
Google recommends fully qualified URLs and the versions you want shown in search. If substantially the same content is available at several addresses, decide which version belongs in the inventory. Use consistent protocol, hostname and paths rather than mix old and current variants.
Sitemaps are especially useful when normal navigation may miss important content. A well-linked small site may not require one. Neither a particular number of clicks nor a universal page-count threshold decides every site’s need; review your discovery paths and current platform output.
Prepare access and a recoverable source
You need to identify how your CMS or build system publishes files and who can change that configuration. Keep a copy of the current sitemap and its generating rules. If you want to submit it through the Search Console Sitemaps report, use a property for which you have owner permissions.
Prepare a list of intended public destinations, any redirects or exclusions, and the source of modification dates. These decisions matter more than the particular editor you use. A file generated from a database and a file maintained by hand still need the same output checks.
Step 1: Find the existing sitemap and its generator
Look at the current robots.txt file for a Sitemap reference, the Search Console Sitemaps report, and your platform’s sitemap settings. A conventional path such as /sitemap.xml is a place to check, not a requirement that every platform use that filename.
The report only lists submissions made through that report or the API. A sitemap discovered through robots.txt can therefore exist without a row in the report. Follow any sitemap index to its child files and compare their contents with actual pages.
Multiple sitemaps are supported. The problem to investigate is inconsistent or outdated output, not the mere presence of another file. Do not disable a platform’s generator until you know what creates the replacement and how future publishing will update it.
Step 2: Choose a method you can maintain
Google describes CMS generation, manual creation and automatic generation from your own website software. Prefer a method connected to the source of your published URLs. A one-time export needs a clear update owner.
Use the CMS’s existing generation
If your CMS or SEO extension supplies a sitemap, inspect its current documentation and settings. Confirm which content types and exclusions it uses. Avoid changing an indexing setting solely to edit the sitemap: that setting can also affect the page’s search eligibility.
Review a crawl-derived export
A crawler export can help you inspect a site without a structured content inventory. Review its start URLs, exclusions, authentication and rendering settings. Pages absent from that crawl are not necessarily absent from the website. Compare the export with your known published routes before using it as the complete sitemap.
Generate from a route inventory or maintain a small file
For a custom site, generate the file from the same routes or content records used for publishing. A small, stable inventory can also be maintained manually. Include XML escaping and deliberate date handling in the generator rather than assemble raw text from unreviewed URL strings.
Step 3: Create valid XML and split it when needed
Google’s sitemap format guidance requires UTF-8 encoding. Use a urlset root with the sitemap namespace, a url entry for each address, and a loc containing its absolute URL. This example contains illustrative addresses and modification dates:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/services/</loc>
<lastmod>2026-10-01</lastmod>
</url>
<url>
<loc>https://example.com/guides/?topic=solar&type=guide</loc>
</url>
</urlset>
The ampersand between query parameters is written as & in XML. It is not a reason to list an unnecessary query variant: choose the URL purpose first, then encode it correctly. A query parameter is not automatically a duplicate.
A single sitemap can contain up to 50,000 URLs and be no larger than 50 MB uncompressed. The protocol expresses that size as 52,428,800 bytes. Check the actual uncompressed output rather than the compressed download size. Split files before exceeding either limit.
A sitemap index groups child files. Keep the index and children accessible, and inspect the child files too. This is an illustrative index; it does not assert that these files exist:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap><loc>https://example.com/sitemap-pages.xml</loc></sitemap>
<sitemap><loc>https://example.com/sitemap-guides.xml</loc></sitemap>
</sitemapindex>
Hosting at the site root is a useful default. Google also permits other locations, with directory-scope limitations unless submitted through Search Console. Cross-site submission has additional verification requirements; use Google’s documented procedure if your files represent more than one site.
Step 4: Choose URLs by intended search purpose
Include preferred public destinations you want considered for search. A new page need not already be indexed to be listed. A successful response and a self-referential canonical are useful checks, but they do not establish that Google has indexed the page.
| Observed URL | Decision to make | Check |
|---|---|---|
| Current public service page | Include the intended preferred address. | It serves the expected content without an unintended exclusion. |
| Old address that redirects | Use the current preferred destination. | The move terminates at the right page. |
| Deliberately excluded utility page | Keep discovery signals aligned with its exclusion. | A shared setting has not excluded public service pages too. |
| Useful paginated collection | Review the distinct pages and their purpose. | Later pages contain different items, not a duplicate of page one. |
| Removed resource | Remove the obsolete inventory entry. | Any useful replacement has been considered separately. |
Google’s pagination guidance recommends distinct URLs and appropriate canonicals for the pages in a sequence. Do not classify every later page as a duplicate. Review useful archives, filters and standalone documents by their actual content and intent.
A sitemap also does not replace navigation. If a useful page has no incoming internal link, add a relevant connection rather than rely on the sitemap as its only discovery path. The indexing entry explains why discovery and eventual inclusion remain different observations.
Step 5: Use accurate modification dates
Google’s XML guidance says it ignores the priority and changefreq values. It uses lastmod when the value is consistently and verifiably accurate. Google describes significant changes to main content, structured data or page links as relevant; merely changing a copyright date is not the same thing.
The page’s modification date and the time the sitemap was generated are different. If your system cannot establish a trustworthy page date, omit the optional field rather than assign the current time to every address.
Use a valid date such as 2026-10-01, or a full supported date-time such as 2026-10-01T09:30:00+00:00. These are syntax examples, not the modification history of any actual page. The index file’s optional lastmod describes the child sitemap’s change, rather than every page within it.
Step 6: Validate the file and its destinations
- Parse the emitted file as XML and check its root, namespace and required location elements.
- Check encoding, escaped values, URL count and uncompressed file size.
- Compare the listed addresses with your intended public inventory.
- Inspect representative responses, canonicals, crawl access and exclusion instructions.
- Test a new page, an updated page and a removed or redirected page against the generator’s expected output.
- Fetch the public file after deployment and confirm you received XML rather than a login screen or error page.
A parser verifies syntax, not the availability or usefulness of every listed page. A successful sitemap fetch also does not certify indexing. Keep these checks separate so a green XML result does not hide a wrong inventory.
Step 7: Submit the exact file and inspect reporting
Submit through the correct Search Console property
The Sitemaps report submits the file’s location; it does not upload the file to Google. Publish an accessible file first, then submit its exact URL using an owner-authorized property. Check that you are using the intended protocol and hostname.
Read the last-read time, processing status and any errors. Success means Google fetched and read the sitemap. It does not mean every listed URL was crawled or indexed. Individual URL problems differ from a file that cannot be fetched or parsed.
Provide a Sitemap reference where useful
Google accepts an absolute Sitemap line in robots.txt and supports multiple references. The line is a discovery aid, not a prerequisite for a valid robots file or a permission override:
Sitemap: https://example.com/sitemap.xml
Keep the existing crawl policy intact when adding the line. It does not require an Allow-all group and does not make a blocked destination fetchable. The robots.txt implementation guide covers testing those rules.
Check other search engines’ submission requirements
The sitemap protocol supplies a common format, but each search engine has its own discovery and reporting behavior. If another engine matters to your business, check its current webmaster documentation and account permissions. Do not promise that one robots reference or submission ensures discovery by every search or AI system.
Measure the completed steps separately
You can verify that your generator produced the intended inventory, that the live file is accessible and that Search Console reports a processing result. Google’s build guidance describes submission as a hint and does not guarantee downloading the file or using it to crawl every address.
To investigate one page’s inclusion, use its actual indexing observation. A gap between discovered and indexed totals is not, by itself, proof of poor content. Avoid assigning a universal number of hours to sitemap processing or weeks to page inclusion.
Troubleshoot the reported layer
| Observation | Check next |
|---|---|
| Couldn’t fetch | Inspect the exact submitted URL, public response, authentication and crawl access. |
| Parse or date error | Read the reported detail and inspect the emitted XML and affected value. |
| Old redirect or removed URL remains | Correct the generating inventory rather than repeatedly hand-edit an overwritten file. |
| A listed page is not indexed | Inspect that URL’s reported state, current content and directives separately. |
| Expected sitemap absent from report | Check the property and whether that file was submitted through the report or API. |
The Page indexing documentation says “Discovered, currently not indexed” means Google knows the URL but has not yet crawled it. It does not mean Google fetched the page and rejected its content. Fix confirmed access or inventory issues, and keep the report’s scope attached to the observation.
Keep the published inventory current
Tie updates to publishing, meaningful revisions, moves and removals. Check output after a CMS, route or generator change. A manual file needs an accountable owner; an automated file needs checks that catch regressions. Choose review frequency from your rate of change rather than a universal quarterly schedule.
- New intended public URLs appear without waiting to be indexed first.
- Moved or removed addresses no longer remain as preferred entries.
- Useful page types retain the intended inventory and canonical choices.
- Modification dates reflect real changes or are omitted when unknown.
- The live sitemap and its child files remain fetchable.
Sitemap FAQ
What is the difference between an XML sitemap and an HTML sitemap?
An XML sitemap supplies machine-readable URL information to crawlers. An HTML sitemap is a page of links for visitors. Useful navigation can also help discovery, so choosing XML does not make human-facing links irrelevant. Maintain each only when it has a useful role in your site.
Do AI search engines use XML sitemaps?
The sitemap protocol does not establish that every AI provider consumes your XML file. Check the provider’s current documentation and access controls. For example, OpenAI distinguishes search crawling, model-training crawling and user-triggered retrieval. Making a sitemap accessible does not guarantee an AI citation.
How do I create a sitemap for a JavaScript-heavy site?
Use the application’s published route or content inventory to generate the file, then inspect both the sitemap and rendered pages. A sitemap can expose an address while that page’s important content remains unavailable to a crawler. Google’s JavaScript guidance treats crawling, rendering and indexing as separate parts of the investigation.
AI assisted this theStacc revision using the primary references linked beside their claims, checked on October 12, 2026. Examples are illustrative. No private Search Console property, customer indexing improvement, platform account or named human approval was tested. Original publication fields are preserved with unresolved historical provenance.
Sources & references
Plan topics, review article drafts, and publish to a connected CMS.
Weekly local SEO teardowns
One practical email a week. Map Pack, GBP, AI Overviews. No fluff. Unsubscribe anytime.
Explore this topic: XML Sitemap.