Which URLs Belong in an XML Sitemap?

Choose deliberate canonical and indexable URLs for a sitemap, maintain last-modified evidence, and avoid redirects, errors, duplicates, and parameter variants.

SharePost on XShare on LinkedIn
Watercolor illustration of selected cobalt paths entering a coral sitemap document while faint alternate paths remain outside

The short answer

Include the absolute canonical URLs you deliberately want search engines to discover and consider for search. Exclude redirects, error pages, noindex pages, duplicate and parameter variants, session URLs, and alternate URL versions unless a documented platform-specific use case requires them.

XML Sitemap Generator showing selected Overhyped canonical URLs beside generated sitemap XML and deployment guidance
The focused XML Sitemap Generator workspace using selected Overhyped URLs, captured 30 August 2026. Inclusion in the file does not guarantee crawling or indexing.

A sitemap is not a dump of every URL your server can return.

It is a maintained set of preferred public locations. The difficult work is choosing that set. Turning it into XML is the easy part.

Start from canonical intent

Google recommends including the canonical URLs you want to see in search results. Use complete absolute URLs, including the chosen protocol and host. See Google’s build-a-sitemap guidance.

For a typical site, one content page should have one preferred sitemap location. Do not list every tracking, sorting, session, print, mobile, and redirecting variant merely because it is reachable.

Exclude obvious non-candidates

Review and normally remove:

  • URLs that redirect elsewhere.
  • 4xx and 5xx responses.
  • Pages deliberately marked noindex.
  • Alternate URLs canonicalized to another page.
  • Duplicate parameter combinations.
  • Search results or infinite filters with no intended search value.
  • Private, authenticated, or environment-specific URLs.

Some exceptions exist. Confirm the site’s real architecture before applying rules in bulk.

Keep discovery and indexability separate

Being in a sitemap does not override robots controls, authentication, canonicals, or noindex directives. It also does not prove that a search engine has indexed the page.

Use a sitemap generator only after the URL set has been reviewed. Use page-level checks and Search Console separately when you need eligibility or private indexing evidence.

Use lastmod only when it is meaningful

An optional lastmod value can communicate a meaningful page change. It should not be refreshed because the sitemap was regenerated or because a footer changed across the site.

If your CMS cannot supply trustworthy modification dates, omit the field. Incorrect precision is not useful precision.

Generate from a durable source

For a small static website, a reviewed route list can be enough. As the site grows, generate the sitemap from the same database, CMS, or build process that knows the canonical public routes.

Manual XML becomes stale. Source-generated XML keeps changes reviewable and repeatable.

Verify after generation

  1. Deduplicate URLs and remove fragments.
  2. Confirm all locations are absolute HTTP or HTTPS URLs.
  3. Review mixed origins deliberately.
  4. Validate the XML structure and file limits.
  5. Publish the file at its intended public URL.
  6. Confirm the live response, content type, and declarations.
  7. Submit or monitor it in the appropriate search-engine property when available.

Google’s sitemap limits are 50,000 URLs or 50 MB uncompressed per file. Split larger sets and use a sitemap index where appropriate.

What generation cannot guarantee

A generated file is not automatically a useful file. It cannot decide which pages support the business, which duplicates should consolidate, or whether Google will crawl or index a location.

Use the free XML Sitemap Generator to turn a reviewed URL list into XML and copy an agent-ready deployment prompt.

Method note: generation happens in the browser from the URLs entered. The tool does not crawl the site or upload the result. Last reviewed 30 August 2026.

Continue learning

Keep moving with a closely related topic and a free tool you can use immediately.

Watercolor illustration of a cobalt link path meeting one coral break while other paths fade behind cream mist

Broken Link Versus Unavailable Response

Distinguish confirmed HTTP errors from redirects, timeouts, bot blocks, and temporary failures before removing or changing useful page links.

Watercolor illustration of cobalt content cards connected by clear coral paths across textured cream paper

What a Useful Internal Link Tells People and Search Engines

Review crawlable internal links, descriptive anchor text, destination intent, and page-level evidence without pretending one page reveals a whole site architecture.

Watercolor illustration of nested cobalt paper steps forming a clear hierarchy with one coral focal mark

Headings Are Document Structure, Not a Keyword Checklist

Review H1–H6 headings as an ordered document outline for people and assistive technology without inventing rigid SEO penalties or keyword rules.