← All posts How-To

Submit a Sitemap to Google: Build, Check, Monitor

Submit a sitemap by making the file publicly available and telling Google its location through Search Console or another supported method. You are not uploading your pages to Google's index. A sitemap is a discovery and canonical-preference hint; it does not guarantee that the file will be downloaded or that its URLs will be indexed.

A sitemap file submitted through a Search Console-style interface
The illustration shows a location submission, not an upload of page content or confirmation that listed URLs are indexed. Open full-size diagram.

Decide what belongs in the file

List the public canonical URLs you want considered for search. Prefer the final HTTPS hostname and path rather than redirects, tracking variants, drafts or preview links. A sitemap should express a coherent publication policy. If the same article exists under several addresses, decide which version is preferred before exporting all of them as if they were independent pages.

Separate the sitemap file's validity from the pages' indexability. A perfectly formed XML file can list inaccessible or noindexed pages. Conversely, a page absent from the sitemap can still be discovered through links. The sitemap is one part of a wider site architecture, not a complete statement of what a search engine knows.

Google's sitemap introduction describes where sitemaps are particularly useful. For implementation details, use its build and submit guide. These primary sources are more reliable than instructions promising immediate indexing after submission.

Generate a maintainable inventory

Start with your CMS's existing sitemap feature. Common filenames include sitemap.xml and sitemap_index.xml, but the filename is not the deciding factor. Inspect the contents and confirm which publication rules drive it. Two SEO plugins generating competing inventories can create confusion, so choose one maintained source of truth.

For a custom application, generate the file from the same publication rules used by the public website. Exclude scheduled content until it is actually public. Escape XML characters correctly, use UTF-8 and produce absolute URLs. Build the output atomically so a crawler never receives a partially written file during regeneration.

Google documents a limit of 50,000 URLs or 50 MB uncompressed per sitemap. Split larger inventories into multiple files and use a sitemap index when useful. These are file limits, not daily crawl quotas. Grouping files by stable content family can also make reports easier to investigate when one section behaves differently from another.

Generate, validate, make fetchable, submit and reference in robots.txt
Each step has a separate check: correct inventory, valid XML, public fetch, submission record and discoverable sitemap location. Open full-size diagram.

Understand the minimal XML structure

A basic sitemap has a urlset root in the sitemap namespace. Each url element contains a loc value with an absolute URL. Optional lastmod values should represent significant page changes. Here is a small illustrative file; replace the example domain and dates with your actual publication data.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/guides/sitemaps</loc>
    <lastmod>2026-10-20</lastmod>
  </url>
</urlset>

XML escaping is distinct from URL encoding. An ampersand in a URL's query string must be represented appropriately in XML, while characters within the URL still need valid URL encoding. Use a real XML serializer instead of concatenating unescaped database values. Validate the resulting bytes, not merely the template that was supposed to generate them.

Google ignores priority and changefreq values. Adding maximum priority everywhere does not create a queue-jumping mechanism. Google may use lastmod when it is consistently accurate; resetting it on every request or deployment defeats that purpose. If you cannot determine a trustworthy modification date, omitting an optional field is better than inventing one.

Validate both the file and its destinations

Parse the file as XML and check the namespace, root element, character encoding and URL count. Then sample destinations from each content family. Confirm the final response, canonical annotation, robots directives and public content. For a small site, checking all entries is practical; for a large site, combine automated checks with representative inspection.

Check for accidental staging domains, mixed www and non-www forms, relative paths and URLs that redirect several times. A migration often leaves an old sitemap generator active even after the site itself moves. Align the inventory with the current canonical destination rather than relying on redirects to repair every exported entry.

If you use localized versions, image metadata or video extensions, follow the relevant extension rules. Do not add complex fields merely because a plugin offers them. Each extra data source needs its own accuracy checks. A simple truthful file is more useful than an elaborate inventory filled with outdated or contradictory metadata.

Example XML with absolute canonical URLs inside url elements
The essential structure is urlset, url and loc. The body includes a copyable example; lastmod is optional and must reflect real significant updates. Open full-size diagram.

Make the actual file fetchable

Request the sitemap as an anonymous visitor and inspect the response body. A successful status that serves a login form, generic HTML error page or bot challenge is not a valid sitemap response. Confirm the file is served from the intended host and remains available after a cache refresh or application restart.

Check robots rules, firewall behavior, redirects and server errors. A public browser test is useful but does not establish that every crawler receives the same response. If Search Console reports a fetch failure, compare its timing with server and CDN logs. Intermittent availability deserves investigation even when the URL works during your manual test.

Google recommends root placement for broad coverage when the sitemap is not submitted through Search Console. Subdirectory placement can limit the affected descendants under the documented location rules. Cross-site hosting has additional verification or robots-reference requirements; follow the official guide rather than assuming any domain can submit any site's inventory.

Submit through Search Console

Select the correct verified property and open the Sitemaps report. Enter the sitemap or sitemap-index location in the format the interface requests, then submit. Use an account with the required permissions. A Domain property and a URL-prefix property have different scopes, so a hostname or protocol mismatch can explain why a valid file is awkward to submit from the selected property.

Read the report after processing rather than assuming the click caused an immediate fetch. The Sitemaps report documentation explains status, last-read information and errors. Success means the sitemap was processed successfully in that context; it does not mean every discovered URL is indexed.

For automated management, Google also documents the Search Console sitemap submission API. This is different from the restricted Indexing API and different from the read-only URL Inspection API. Use the correct authorization and property identifier rather than substituting one API because its name sounds relevant.

Reference it in robots.txt and maintain it

Add a Sitemap line containing the absolute location to the site's robots.txt file. For example, use Sitemap: https://example.com/sitemap.xml. This provides another supported discovery path. A robots reference does not grant permission to crawl blocked pages and does not override the pages' canonical or noindex signals.

Keep the same sitemap location stable where practical. Update its contents when pages are published, substantially changed, redirected or removed from the intended public inventory. If files are split, ensure the index links to all current members and stops referencing retired ones. Monitor generation failures so a job cannot silently leave a stale inventory indefinitely.

For an ordinary removed article, remove it from the public canonical sitemap and return an appropriate removal response or relevant redirect. Deleting the sitemap entry alone does not remove the URL from Google's index. Search engines need to observe the page's actual state; content lifecycle and sitemap maintenance should agree.

Discovery hints and indexing decisions are separate
A readable sitemap helps discovery. Downloading it, crawling a listed page and indexing that page remain separate decisions and observations. Open full-size diagram.

Troubleshoot the right layer

If the file cannot be fetched, investigate delivery. If it can be fetched but cannot be parsed, investigate serialization and format. If it parses but URLs are excluded, inspect representative pages and canonical signals. Treating all three situations as a sitemap problem leads to repeated submissions without a useful repair.

Compare a hypothetical articles sitemap with a products sitemap. If only products show many exclusions, inspect the product template, stock-status responses and duplicate variants before changing the shared XML generator. If both files suddenly return HTML, look at routing or authentication changes instead. The pattern determines the next investigation.

Use our URL Inspection guide for individual evidence, diagnostic checklist for exclusion reasons and site launch guide for the wider workflow. Truva Indexer does not treat sitemap acceptance as an indexing guarantee.

FAQ

Do I need to submit the sitemap after every edit?

Maintain the accessible file at a stable location. Repeated manual submission is not a substitute for accurate generation or a way to force a faster crawl.

Can I use a text sitemap?

Yes. Google supports a text file containing one absolute URL per line for ordinary page URLs. XML is useful when you need supported extension metadata.

Does removing a sitemap remove its pages from search?

No. A sitemap is a discovery hint. Use the appropriate page status, directives and removal processes for the actual content you want removed.

Stop waiting for Google to find you.

Manage URL submissions and track their progress. Search engines determine indexing eligibility and timing.

Index your first URL