Create an XML sitemap from the canonical public pages you want indexed, using absolute URLs and valid XML. Publish the file, check that its URLs and modification dates are accurate, then submit it in Search Console. A successful submission does not mean every listed page has been indexed.
On this page
- Check for an existing sitemap before creating another
- Choose URLs with a small inventory table
- A minimal XML sitemap you can adapt
- Use lastmod for a significant change
- Validate the XML before submitting it
- Check the deployed file and a sample of its pages
- Submit the actual address in Search Console
- Diagnose the failure at the right level
- Sources & further reading
Check for an existing sitemap before creating another
Open your website's robots.txt file and look for a Sitemap: entry. Your CMS or publishing system may already generate a sitemap or sitemap index. Common locations include /sitemap.xml and /sitemap_index.xml, but use the actual address supplied by your platform.
A sitemap index is a file pointing to individual sitemap files. It is not a page listing every article directly.
If an existing sitemap correctly reflects your public content, maintain that generator rather than creating a second manual inventory. A manual file becomes stale easily when someone publishes, renames or retires a page.
The useful first question is not “which generator should I install?” It is “which published URLs should this file describe?”
Choose URLs with a small inventory table
For an illustrative service website, make decisions like these before writing XML:
| URL | Include? | Reason |
|---|---|---|
https://example.com/ |
Yes, if intended for indexing. | The preferred homepage. |
https://example.com/services/banner-printing |
Yes, if public and indexable. | A distinct useful service page. |
https://example.com/guides/banner-artwork |
Yes, if published and indexable. | A useful preparation guide. |
https://example.com/guides/banner-artwork?ref=email |
Usually use the clean preferred URL instead. | A tracking variant should not create a second content entry. |
https://example.com/search?q=banners |
No for this editorial inventory. | Internal search results are not the selected publication pages. |
| A draft, account screen or error URL | No. | It does not represent a useful indexable public page. |
| An old URL redirecting to the guide | Use the final preferred guide URL. | The inventory should identify the intended destination. |
These are selection decisions for the example, not a claim that every parameterized URL is useless. Some parameters identify genuinely distinct pages. Understand your site's URL behavior before excluding a whole pattern.
Google describes sitemap inclusion as one canonicalization signal, with redirects and canonical link annotations carrying stronger signals. Keep the inventory, internal links and preferred URL consistent.
A minimal XML sitemap you can adapt
This complete example lists the three selected public pages. The dates are illustrative; use actual significant modification dates or omit lastmod when you cannot support them.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
</url>
<url>
<loc>https://example.com/services/banner-printing</loc>
<lastmod>2026-10-18</lastmod>
</url>
<url>
<loc>https://example.com/guides/banner-artwork</loc>
<lastmod>2026-10-20T10:30:00-05:00</lastmod>
</url>
</urlset>
The Sitemaps protocol defines the namespace, URL entries, absolute locations and XML escaping. For instance, an ampersand within an included URL must be encoded as & in the XML.
For most growing sites, the publishing system should generate this structure from the actual content inventory. The example is useful for understanding and checking that output; it is not a reason to maintain every entry by hand.
Use lastmod for a significant change
Google's sitemap documentation says it can use consistently accurate lastmod values. It ignores priority and changefreq.
For a guide, a substantive correction or new method can justify a modification. A deployment that republishes unchanged text does not make the article newly revised.
Keep three events separate:
- First publication: when the article was originally published.
- Significant modification: when its meaningful content changed.
- Build or deployment: when a site artifact was generated or released.
Only the second belongs in the article's last-modified value. If a system currently stamps every URL with every build time, repair that logic before relying on those dates. Do not fill in unsupported dates just because the XML permits them.
Validate the XML before submitting it
For a manually created file, save it as UTF-8 XML and parse it with an XML-aware tool. A browser displaying text is helpful, but it is not the whole publication check.
For a developer with Python 3 installed, this local check uses the standard-library ElementTree parser and makes no network requests:
from pathlib import Path
import xml.etree.ElementTree as ET
root = ET.fromstring(Path("sitemap.xml").read_bytes())
namespace = {"sm": "http://www.sitemaps.org/schemas/sitemap/0.9"}
urls = [
element.text
for element in root.findall("sm:url/sm:loc", namespace)
]
print("URL count:", len(urls))
for url in urls:
print(url)
This confirms that the file parses and lets you inspect its locations. It does not verify that the listed pages are indexable, canonical, accessible or valuable. A sitemap index needs its own file checks because it contains sitemap references rather than these url/loc entries.
For a large inventory, split files when needed: Google documents a limit of 50,000 URLs or 50 MB uncompressed per sitemap. Most small business sites are far below that threshold.
Check the deployed file and a sample of its pages
After publishing, open the real sitemap address in a signed-out browser. Confirm it returns the intended XML rather than a sign-in screen, an error document or HTML from the homepage.
Then sample the homepage, one important service page and a recently changed article. For each:
- Open the exact listed URL.
- Confirm the intended content and successful page response.
- Check the preferred canonical.
- Look for an accidental noindex rule.
- Follow a real incoming link from another public page.
- Compare the visible update with the sitemap date.
Google's noindex guidance explains that a page can exclude itself from indexing through a meta tag or HTTP header. Merely listing that page in a sitemap does not remove the rule.
This is also why a sitemap should not be treated as navigation. Give important content a readable path through your site using internal links.
Submit the actual address in Search Console
With owner permissions in the verified property for the correct site, use the Sitemaps report to submit the deployed sitemap address. Submission tells Google where the file is; it does not upload the file to Google. If you have a sitemap index, submit its real address rather than replacing it with a guessed filename.
The Search Console Sitemaps report documentation explains submission and processing information. Read the result as feedback about the sitemap, not as proof that every page has entered the index.
Use a page-specific inspection when the file works but a particular URL is missing from search. Repeatedly submitting the same unchanged sitemap does not diagnose that page's content, access or canonical issue.
Diagnose the failure at the right level
| What you see | Check first | Useful next action |
|---|---|---|
| The sitemap URL returns a not-found page. | Filename, route and deployment output. | Publish the file at the address you submitted. |
| The address returns an HTML homepage. | Redirects and fallback routing. | Serve the actual sitemap XML route. |
| XML cannot be parsed. | Namespace, nesting and unescaped characters. | Repair the file or generator and parse it again. |
| Old or duplicate URLs are listed. | The generator's content source and canonical rules. | Correct the inventory rather than hand-editing one generated file. |
| The sitemap processes but one page is not indexed. | That URL's inspection result. | Resolve the reported page-level condition. |
| All modification dates change on every build. | The timestamp source. | Save real content modification dates. |
Once the inventory is accurate, keep it tied to publishing. A new article, a genuine revision and a retired page should each update the right records without manufacturing new dates for unrelated pages.
For the facts inside an article, continue with the BlogPosting schema example. For Google AI eligibility, use the AI search diagnostic checklist.
Sources & further reading
Primary references checked Oct 20, 2026. Platform guidance can change.
AI-assisted research and writing. Learn about our editorial standards.
Suggest a correction ↗



