An XML sitemap is one of the simplest technical SEO tools available to you — but also one of the most commonly misunderstood. Used correctly, it helps Google discover and understand your content faster. Used incorrectly, or ignored entirely, it can actively mislead search engines and undermine your technical SEO efforts.
What Is an XML Sitemap?
An XML sitemap is a file — usually at yourdomain.com/sitemap.xml — that lists the URLs on your website along with metadata: when each page was last modified, how frequently it changes, and its relative priority. Think of it as a map you hand directly to search engines. Rather than relying entirely on Googlebot to discover your pages by following links, the sitemap provides a direct inventory of what exists on your site.
Important: submitting a sitemap doesn’t make pages rank. It helps Google know your pages exist and consider them for indexing. Whether they rank depends on their quality, relevance, and the authority of your site.
Why XML Sitemaps Matter for SEO
New websites benefit particularly from sitemaps because they have few external links pointing at them. Without a sitemap, Googlebot might not discover all their pages quickly. Large websites — e-commerce stores, news sites, databases — have too many pages for Google to reliably discover through link-following alone. Sites with isolated content — pages not well-linked internally — rely on the sitemap to get those pages found. Good internal linking and a clean sitemap work hand in hand; think of sitemaps as a complement to strong site architecture, not a substitute for it.
What to Include in Your XML Sitemap
Include only the canonical, indexable versions of pages you want Google to consider for ranking: key landing pages, service or product pages, blog posts, and category pages. Exclude pages with a noindex tag, pages returning non-200 status codes, duplicate or parameter-driven URLs, admin pages, and anything not intended for Google’s index. Including low-quality or redirected pages wastes Google’s time and signals poor site hygiene. This is one of the areas a technical SEO audit will typically flag quickly.
How to Create and Submit Your XML Sitemap
If you’re running WordPress, a sitemap is almost certainly already being generated automatically. Plugins like Yoast SEO, Rank Math, and All in One SEO all generate XML sitemaps. Check yours at yourdomain.com/sitemap.xml or yourdomain.com/sitemap_index.xml. For large sites with thousands of URLs, use a sitemap index file — a master file linking to multiple individual sitemaps, each limited to 50,000 URLs.
Submit your sitemap via Google Search Console: go to Indexing > Sitemaps and enter the URL. Google will show you how many URLs were submitted versus indexed, and flag any errors. Also reference your sitemap in your robots.txt file so other search engines like Bing can find it automatically.
How to Optimise Your XML Sitemap
Keep lastmod dates accurate — only update lastmod when page content has genuinely changed. If Google sees the date changed but content is identical, it’ll start ignoring your lastmod values. Don’t over-rely on priority — Google largely ignores it. Keep your sitemap current as you add or delete pages. Run it through a checker periodically to ensure all URLs return a 200 status code. Any URLs returning errors or redirects should be removed and addressed — see our guide on fixing crawl errors in Google Search Console.
Common XML Sitemap Mistakes
Including redirected URLs. Including noindex pages (which contradicts your own directives). Having an outdated sitemap referencing deleted pages. Forgetting to submit to Search Console. All of these send poor signals about site quality and waste Google’s crawl budget.
Continue with the Technical SEO Series
XML sitemaps are one piece of a comprehensive technical SEO strategy. Head back to The Complete Guide to Technical SEO to see how they fit into the bigger picture, and explore the other guides on crawl errors, Core Web Vitals, canonicalisation, page speed, mobile-first indexing, and structured data.