Every guide to launching a website mentions sitemaps, but few explain them plainly. What is XML sitemap, exactly? It is a simple file — usually called sitemap.xml — that lists the important pages on your website so search engines can find and crawl them efficiently. Think of it as handing Google a map of your site instead of making it wander around discovering rooms by accident.
This beginner’s guide covers what goes into a sitemap (and what must stay out), the sitemap.xml format with a real example, how to create one and submit it to Google Search Console — and the honest truth the big SEO guides bury: a sitemap is a discovery aid, not a ranking factor. It will not make you rank higher; it helps Google find your pages. Our free XML sitemap generator builds one for any site in seconds.
Table of Contents
- What Is XML Sitemap: The Plain-English Definition
- The sitemap.xml Format (With a Real Example)
- What to Include — and What to Leave Out
- How to Create an XML Sitemap (3 Ways)
- How to Submit Your Sitemap to Google Search Console
- XML Sitemap vs robots.txt: What’s the Difference?
- The Honest Truth: Discovery Aid, Not Ranking Factor
- Try It: XML Sitemap Generator
- Frequently Asked Questions
What Is XML Sitemap: The Plain-English Definition
If you are still asking what is XML sitemap after the intro, here is the one-sentence version: an XML sitemap is a machine-readable list of your site’s URLs, written in XML, that tells search engines: “these pages exist, here is where they are, and here is how they relate.” Google’s crawler (Googlebot) is good at discovering pages by following links — but links get missed, new pages have no inbound links yet, and large or complex sites have corners crawlers reach slowly. A sitemap hands the crawler a complete inventory upfront.
The format is standardized by the sitemaps.org protocol, agreed by Google, Bing, and Yahoo back in 2006. Every major search engine reads the same file. You place it at your site root (conventionally yoursite.com/sitemap.xml) and optionally reference it in robots.txt — more on that below.
One important clarification: when people say “sitemap,” they sometimes mean the HTML sitemap — a human-readable page listing site sections for visitors. That is a different thing entirely. This guide is about the XML sitemap: invisible to visitors, written for crawlers.
The sitemap.xml Format (With a Real Example)
Now that you know what is XML sitemap in concept, the format is deliberately simple. Here is a minimal but valid sitemap for a three-page site:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2026-09-20</lastmod>
</url>
<url>
<loc>https://example.com/about/</loc>
<lastmod>2026-08-15</lastmod>
</url>
<url>
<loc>https://example.com/blog/hello-world/</loc>
<lastmod>2026-09-26</lastmod>
</url>
</urlset>
Each <url> entry has one required tag — <loc>, the full URL including https:// — and optional tags. <lastmod> (last modified date) is the useful one: it tells crawlers which pages changed so they can prioritize re-crawling. Two legacy tags, <changefreq> and <priority>, still appear in old examples, but Google has publicly said it ignores both — do not waste time tuning them. The protocol also caps a single sitemap at 50,000 URLs or 50 MB uncompressed; bigger sites use a sitemap index file pointing to multiple sitemaps.
What to Include — and What to Leave Out
The golden rule for anyone who has learned what is XML sitemap and is building their first one: a sitemap should contain only URLs you want indexed — canonical, 200-status, indexable pages. Everything else actively harms you (more in the honest-truth section). Concretely:
Include: your homepage, key landing pages, blog posts, product/category pages, and any important page that is hard to reach by following links (deep pages, new pages, pages in JavaScript-driven navigation).
Leave out: redirected URLs (list the destination, not the redirect), duplicate or canonicalized variants (list only the canonical), noindexed pages, 404s or server-error pages, login/admin/cart/checkout pages, thin auto-generated pages (tag archives, calendar pages), and anything blocked by robots.txt. Every junk URL in your sitemap is crawler attention stolen from URLs that matter.
This is where most auto-generated sitemaps quietly fail: plugins happily include every URL the CMS knows about, including the junk. A sitemap is a curated list, not a database dump — review what yours contains at least once.
How to Create an XML Sitemap (3 Ways)
Once you understand what is XML sitemap, creating one is a solved problem — three ways, easiest first:
- CMS plugin (easiest). WordPress SEO plugins (Rank Math, Yoast) generate and update sitemaps automatically at
/sitemap_index.xml. Shopify, Wix, and Squarespace generate them natively. If your platform does this, you mostly just need to check the output is sane. - Online generator. For static sites or a quick audit, crawl-based generators build a sitemap from any URL. Our free XML sitemap generator crawls your site and produces a downloadable
sitemap.xml— handy for sites without a CMS doing it automatically. - By hand or script. For small sites, hand-writing the XML above is fine. For large or dynamic sites, generate it from your database or CMS API on a schedule. Whatever the method, validate the result — Google Search Console will tell you about errors after submission.
How to Submit Your Sitemap to Google Search Console
Creating the file is half the job; telling Google about it is the other half. If you have just learned what is XML sitemap and built your first one, here is how to submit it:
- Open Google Search Console and select your property.
- In the left menu, go to Sitemaps.
- Under “Add a new sitemap,” enter the path — just
sitemap.xml(not the full URL) — and click Submit. - Wait. Google fetches it within a day or so and reports status: discovered URLs, errors, warnings.
- Check back periodically. “Couldn’t fetch,” “URL not allowed,” or a sudden drop in discovered URLs all signal problems worth investigating.
You can also ping search engines or reference the sitemap in robots.txt (Sitemap: https://yoursite.com/sitemap.xml), but Search Console submission is the reliable, verifiable path — it gives you error reporting the other methods do not.
XML Sitemap vs robots.txt: What’s the Difference?
Beginners who just learned what is XML sitemap constantly confuse it with robots.txt, so let us settle it. A sitemap says: “here are my important pages — please crawl them.” robots.txt says: “here are the areas crawlers may or may not visit.” They are complementary opposites: the sitemap invites, robots.txt restricts.
Crucially, robots.txt does not hide pages from search results — it only asks crawlers not to visit. A page blocked by robots.txt can still be indexed if other sites link to it (Google will show the URL without a description). If you truly want a page out of search results, use a noindex meta tag — and then remove it from your sitemap, since sitemap URLs should be indexable. Our companion guide on what a robots.txt file is covers that file in depth.
The Honest Truth: Discovery Aid, Not Ranking Factor
Here is what the big SEO guides underplay about what is XML sitemap: an XML sitemap does not improve your rankings. Google has been explicit — sitemaps help with discovery and crawling, especially for new sites, large sites, and sites with rich media or news content. They do not confer any ranking boost. A perfect sitemap on thin content outranks nothing.
Worse, a messy sitemap actively wastes your crawl budget — the limited attention Googlebot gives your site. Every redirect, duplicate, 404, or noindexed URL in the sitemap is a fetch spent on garbage instead of your real pages. On large sites this measurably slows the indexing of new content. So the honest advice is: keep your sitemap ruthlessly clean, submit it once, check it occasionally — and then spend your SEO energy on content and links, where rankings are actually decided. For the on-page side, our guides on writing meta descriptions and meta tags cover what you control.
Try It: XML Sitemap Generator
If your platform does not generate a sitemap automatically, the fastest path is our free XML sitemap generator: enter your URL, let it crawl, and download a clean sitemap.xml ready to upload and submit. It lists real, crawlable pages — review the output against the include/leave-out rules above before submitting. For Google’s own documentation, see Google’s sitemap guide.
Frequently Asked Questions
Does a sitemap help Google index my pages faster?
It helps with discovery, not speed guarantees. A sitemap tells Google your pages exist, which helps new pages and hard-to-find pages get crawled. But Google still decides what to index and when; a sitemap is an invitation, not a command. Clean internal linking matters at least as much.
What is the difference between an XML sitemap and an HTML sitemap?
An XML sitemap is a machine-readable file (sitemap.xml) written for search engine crawlers. An HTML sitemap is a human-readable page on your site listing sections for visitors. They serve different audiences; this guide covers the XML kind — by now you know what is XML sitemap and what it is not.
Where do I submit my XML sitemap?
In Google Search Console under Sitemaps — enter just the file path (sitemap.xml) and submit. You can also reference it in robots.txt with a Sitemap: line, and Bing Webmaster Tools accepts sitemap submissions too.
Is an XML sitemap a Google ranking factor?
No. Google is explicit that sitemaps aid discovery and crawling but confer no ranking benefit. A messy sitemap full of redirects, duplicates, or noindexed pages can waste crawl budget, so keep it clean — but it will not move your positions up or down by itself.