How to create an XML sitemap
- Enter your home page address and press Generate sitemap. The crawler follows the links on your site, up to 500 pages, and skips anything robots.txt blocks.
- Check the Pages list. Pages marked noindex, pages whose canonical points elsewhere and broken pages are left out automatically. Tick or untick any row to change that.
- Choose whether to add
<lastmod>. Leavechangefreqandpriorityout unless another search engine you care about needs them. - Press Download to save
sitemap.xml, then follow the steps below to publish and submit it.
Already have a list of addresses, for example exported from your CMS or analytics? Use Paste URLs instead.
After you download: publish and submit your sitemap
- Upload the file to your site's root folder so it opens at
https://yourdomain.com/sitemap.xml. - Add it to robots.txt with a line such as
Sitemap: https://yourdomain.com/sitemap.xml. Our robots.txt generator can write the file for you. - Submit it in Google Search Console under Indexing → Sitemaps, and in Bing Webmaster Tools under Sitemaps. Google retired its old "ping" URL in 2023, so submitting in Search Console or listing the file in robots.txt is now the way to tell Google about it.
- Regenerate it when you add or remove pages. A sitemap that lists deleted pages wastes crawl time and shows up as errors in Search Console.
What each sitemap tag means
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/pricing</loc>
<lastmod>2026-11-10</lastmod>
</url>
</urlset>
| Tag | Required? | What it does | Used by Google? |
|---|---|---|---|
<urlset> | Yes | Wraps the whole file and declares the sitemaps.org namespace | Yes |
<loc> | Yes | The full page address, including https:// | Yes |
<lastmod> | No | Date the page content last changed (YYYY-MM-DD) | Yes, if the dates are consistently accurate |
<changefreq> | No | How often the page tends to change | No, ignored |
<priority> | No | Importance from 0.0 to 1.0 relative to your other pages | No, ignored |
Sitemap rules and limits
- 50,000 URLs or 50 MB (uncompressed) per file, whichever comes first. Larger sites use several sitemaps listed in a sitemap index; the Paste URLs tab builds one for you when needed.
- Absolute URLs only, on the same host and protocol as the sitemap.
https://example.com/aandhttps://www.example.com/aare different hosts. - UTF-8 encoding, with
&,<,>and quotes escaped. The generator escapes them for you. - List canonical, indexable pages only. Leave out redirects, 404s, noindex pages, duplicates and URLs blocked in robots.txt.
- A sitemap is a suggestion, not a command. It helps search engines discover pages; whether they are indexed depends on quality and internal links.
XML sitemap vs HTML sitemap
An XML sitemap is written for search engines and isn't meant to be read by people. An HTML sitemap is an ordinary page of links that helps visitors find content and gives crawlers another path to deep pages. Most sites only need the XML file. If you want a visitor sitemap too, switch the output to HTML and paste the list into a page. Blogger users can use our Blogger sitemap generator, which uses the feed Blogger already publishes.