Step-by-step guide: How to Create an XML Sitemap and Submit It to Google
How to use the XML Sitemap Builder
- Collect the addresses of the pages you want indexed — for example from your CMS, a crawl export or a spreadsheet — and paste them with one per line.
- Choose how to handle last-modified dates. Only include dates you know are accurate; a date that changes every day without the page changing is ignored by search engines.
- Leave change frequency and priority out unless another search engine you target uses them. Google ignores both.
- Select Build sitemap. Any invalid, duplicate or off-domain addresses are listed so you can fix them.
- Download
sitemap.xml, upload it to your site’s root folder, then add aSitemap:line to robots.txt and submit it in Google Search Console and Bing Webmaster Tools.
Example output
Three addresses, one with its own date and “Today” selected for the rest, produce:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.example.com/</loc>
<lastmod>2026-10-26</lastmod>
</url>
<url>
<loc>https://www.example.com/about/</loc>
<lastmod>2026-09-14</lastmod>
</url>
<url>
<loc>https://www.example.com/search?q=shoes&page=2</loc>
<lastmod>2026-10-26</lastmod>
</url>
</urlset>
Note how the & in the last address is written as &. Unescaped ampersands are one of the most common reasons a hand-written sitemap fails to parse.
When a sitemap helps
A sitemap is a list of the URLs you want search engines to know about. Crawlers find most pages by following links, so a small, well-linked site can be indexed without one. A sitemap helps most when:
- the site is new and has few external links pointing to it;
- the site is large, so some pages are many clicks from the homepage;
- pages are added or updated often and you want changes noticed sooner;
- some pages have few or no internal links pointing to them.
A sitemap is a hint, not a command. Listing a URL does not guarantee it will be crawled or indexed.
What to include and what to leave out
List only the canonical version of pages you want to appear in search results. Leave out redirected URLs, pages marked noindex, pages blocked in robots.txt, error pages and duplicate URLs that differ only by tracking parameters. Every address should return HTTP 200 and use the same protocol and hostname as your preferred version of the site.
The lastmod date is useful when it is accurate: Google has said it uses it when it is consistently reliable. Set it to the date the page content last meaningfully changed, not the date you built the sitemap.
How the builder validates your list
Each line is checked as an absolute http or https URL using the browser’s standards-based URL parser. Fragments (anything after #) are removed because search engines ignore them, duplicates are dropped, and the five XML special characters are escaped. Dates must be valid calendar dates in YYYY-MM-DD form. The file is limited to 50,000 URLs, the maximum allowed in a single sitemap by the sitemaps.org protocol.
Limitations to keep in mind
- The builder does not crawl your site to discover pages. You supply the list, which keeps it fast and private but means it cannot find pages you did not include.
- It does not check whether each URL actually loads, redirects or is marked noindex. Check that with a crawler or with Search Console’s page indexing report.
- Image, video and news sitemap extensions are not generated.
- Lists over 50,000 URLs must be split into several sitemaps referenced from a sitemap index file.
How your data is handled
The URL list is processed in your browser and the sitemap file is created on your device. Nothing is uploaded or stored.
Frequently asked questions
Does Google use changefreq and priority?
No. Google has stated it ignores both values. They are offered here only because the sitemap protocol allows them and some other tools expect them. Leaving them out is perfectly valid.
Where should I put the sitemap file?
Usually at the root of your site, for example https://www.example.com/sitemap.xml. A sitemap can only list URLs in the folder it is placed in and below, so the root location covers the whole site.
How do I tell search engines about my sitemap?
Add a line such as Sitemap: https://www.example.com/sitemap.xml to your robots.txt file, and submit it in Google Search Console and Bing Webmaster Tools, which also report any errors they find.
Can I include URLs with non-English characters?
Yes. The builder converts them to the encoded form the protocol requires — for example a space becomes %20 and accented letters are percent-encoded — so the file stays valid.