How to create an XML sitemap
- Paste your page URLs, one per line. You can export them from your CMS, a spreadsheet, a crawler such as Screaming Frog, or your analytics.
- Choose whether to include
lastmod(today, a specific date or none),changefreqandpriority. - Duplicates and
#fragmentlinks are removed, special characters are escaped, and lines that are not full URLs are reported. - Download
sitemap.xml, upload it to your site's root, add aSitemap:line to robots.txt and submit it in Google Search Console and Bing Webmaster Tools.
Sitemap best practices
A sitemap lists the pages you want search engines to find, which helps new sites, large sites and pages with few internal links get discovered faster. Include only canonical, indexable URLs that return status 200; leave out redirects, error pages, noindex pages and parameter variations.
Each sitemap file may contain up to 50,000 URLs and 50 MB uncompressed. Bigger lists are split automatically into numbered files with a sitemap index that points to them.
Google ignores changefreq and priority, so they are optional. It does use lastmod when it is accurate, so only set it to the date a page really changed; marking everything as updated today can make search engines distrust the value.
The sitemap.xml → URLs tab does the reverse: paste any sitemap or sitemap index to get a clean list of URLs, for audits or migrations. All processing happens in your browser.
Do I need a sitemap?
Small, well-linked sites are crawled fine without one, but a sitemap costs nothing and helps search engines discover new and updated pages faster.
Where should I put sitemap.xml?
Usually at https://example.com/sitemap.xml. It can only list URLs on the same host and in the same folder or below.
How do I tell Google about my sitemap?
Submit it in Google Search Console under Sitemaps, and add "Sitemap: https://example.com/sitemap.xml" to your robots.txt so all crawlers can find it.