How to Create an XML Sitemap

An XML sitemap is a direct list of a site's important URLs handed to search engines, speeding up discovery especially for large sites, new sites without many external links yet, or pages that are hard to find through normal navigation.

Published

November 12, 2026

Read time

3 min read

How to Create an XML Sitemap

Generate the sitemap — most platforms do this automatically

Most modern CMS platforms (WordPress with an SEO plugin, Webflow, Shopify, Wix, and headless setups with the right plugin or package) generate and auto-update an XML sitemap without manual work, typically available at yoursite.com/sitemap.xml. For custom-built sites without automatic generation, a sitemap can be built with a dedicated generator tool or a simple script that crawls the site's own URL list.

Include only canonical, indexable, valuable URLs

A sitemap should list only URLs that are meant to be indexed and ranked — not redirect targets, not noindexed pages, not duplicate parameter variants, and not pages blocked in robots.txt (including a blocked URL in a sitemap sends a contradictory signal). Every URL in the sitemap should be one a search engine would actually want to include in its index if it found it.

Keep it current automatically, not manually

A sitemap that isn't updated as content is added or removed loses its value over time — new pages won't be discovered as quickly, and removed pages will still be listed, wasting a small amount of crawl attention. Automatic generation (rather than manually maintaining a static file) is worth setting up even on smaller sites, since manual maintenance reliably falls behind.

Split large sitemaps using a sitemap index

A single sitemap file has a practical limit of 50,000 URLs; sites approaching or exceeding that split their sitemap into multiple files organized logically (one for blog posts, one for product pages, one for static pages), referenced from a single sitemap index file. This also makes debugging easier — if Search Console flags indexing issues, a split sitemap makes it immediately clear which content type is affected.

Submit it in Search Console and reference it in robots.txt

Submit the sitemap URL directly through Google Search Console's Sitemaps report, and add a Sitemap: line pointing to it in robots.txt — this gives any crawler (not just Google) a discoverable reference to it even without a direct submission. Check back periodically; the Sitemaps report shows submission errors and how many submitted URLs are actually indexed, which is worth monitoring rather than a submit-and-forget action.

Common mistakes to avoid

  • Including noindexed or blocked pages in the sitemap, sending a contradictory signal to crawlers.
  • Letting a sitemap go stale on a site with a manually maintained (non-automatic) sitemap file.
  • Submitting a sitemap once and never checking the Search Console report for ongoing errors.

FREE BACKLINK PLAN

Build authority with backlinks that matter

Get a shortlist of sites that already link to competitors in your niche, ranked by authority, without doing the outreach research yourself.

  • 20 link opportunities matched to your niche
  • Discover competitor backlink sources
  • Get actionable link-building opportunities
Backlinks

We'll email you the results and occasional SEO tips. Unsubscribe anytime.

FAQs

Common questions

No — it's a discovery aid, not a directive. Google still evaluates each page independently for indexing eligibility based on quality and other signals; a sitemap just helps ensure a page is found and considered in the first place.

Only for sites where image or video search traffic specifically matters a lot — most standard content sites are fine with a single sitemap covering their pages, without dedicated image or video sitemap extensions.

Related Reading

How to Fix Duplicate Content Issues

How to Fix Duplicate Content Issues

Duplicate content rarely means someone copied your site outright — far more often, it's an accidental byproduct of URL parameters, syndication, or a site migration. Here's how to find it and fix each common scenario correctly.

How to Write an SEO-Friendly FAQ Section

How to Write an SEO-Friendly FAQ Section

A good FAQ section does real work — answering genuine objections and follow-up questions — while also being structured in a way that search engines and AI systems can parse and potentially surface directly. Here's how to write one that does both.

How to Do Keyword Mapping

How to Do Keyword Mapping

Keyword mapping is the step most content teams skip, and it's exactly the step that prevents keyword cannibalization before it happens rather than requiring a painful audit and fix later. Here's how to build one.

Done reading?
Let’s startdoing.

Stop doing SEO manually. Join thousands of teams using SeoSorted to automate their organic acquisition.

No Card Required.