Sitemap.xml Generator
Sitemap generator: assemble a valid sitemap.xml from a URL list or CSV with lastmod, changefreq and priority. Checks the 50,000 URL and 50 MB limits.
Why a site needs a sitemap
A sitemap.xml file is a list of the addresses on a site written in a special XML format, and it tells search crawlers which pages are worth visiting and which ones count as the primary versions. The question of what a sitemap xml example looks like, and the task of building one, come up in two situations: at launch, when search engines do not know the site yet, and after a migration, when a new domain has to be shown the whole structure at once. This sitemap generator assembles a valid file from a plain list of addresses or from a CSV export: it places lastmod, substitutes the domain, checks for duplicates and protocol limits. The result is ready to upload to the site root, to reference from a Sitemap line in robots.txt, and to submit in Search Console.
What the sitemap generator does
- Two sources of addresses: a manual list with one address per line, and a CSV or plain text export
- Absolute addresses: /about turns into a full URL built from your domain
- A lastmod date for every address, plus one common date for the whole file
- Priority from 0.1 to 1.0 and a change frequency of daily, weekly, monthly, yearly or never
- A check panel: address count, file weight, duplicates and the protocol limits
- Copying the finished XML and downloading a sitemap.xml file
How to build a sitemap
- Enter the domain and, if you need one, a common date for the pages
- Choose the source: a manual list or a CSV export
- Paste the addresses, one per line or separated by commas
- Set the priority, the change frequency and optionally keep the home page only
- Check the counters, copy the XML and put the file in the root of the site
How the sitemap format works
The file starts with an XML declaration and a urlset root element carrying the namespace http://www.sitemaps.org/schemas/sitemap/0.9, and without that attribute a search engine will not treat the file as a sitemap. Inside are url elements, each holding a mandatory loc with the full page address and, optionally, a lastmod date in the YYYY-MM-DD format, a changefreq value and a priority number between 0.0 and 1.0. The list is cleaned before assembly: blank lines are skipped, date-looking values are recognised, and repeated addresses are compared in their normalised form and dropped, because the same address twice in a map counts as an error.
Sitemap examples and what each line means
| Line | What it means | Comment |
|---|---|---|
| <loc>https://example.com/</loc> | Address of the home page | The mandatory element of every record |
| <lastmod>2026-01-15</lastmod> | Date of the last change | Format YYYY-MM-DD, change only on real edits |
| <changefreq>weekly</changefreq> | Declared update frequency | Google does not use this value |
| <priority>0.5</priority> | Declared page priority | Google ignores this value |
| xmlns=...sitemap/0.9 | The namespace of the protocol | Without it the file is not a sitemap |
| <urlset> | The root element of the map | Contains all url elements |
| Sitemap: https://example.com/sitemap.xml | A link to the map from robots.txt | The simplest way to connect it |
| <sitemapindex> | An index of maps for large sites | References several sitemap.xml files |
| 50,000 URLs | The maximum number of addresses per file | Going over it is a protocol error |
| 50 MB | The maximum file size before compression | Measured on the uncompressed file |
| https://example.com/page?ref=1 | An address with a parameter | Such addresses do not belong in a sitemap |
| https://example.com/page | The canonical address | This is the one that belongs in the sitemap |
Every line above matches what really ends up in the generated file, including the indentation and the order of the elements.
When a sitemap actually pays off
The first case is a new site. Crawlers learn about pages through links, and a fresh domain has no links yet, so the sitemap turns into the list the crawl starts from, working outwards from the home page and the sections. The second case is a large catalogue where crawling every product takes days and half the links lead nowhere. Here the map saves crawler time: it follows a list instead of grinding through endless pagination. The third is a site with poor internal linking, where important pages sit three clicks deep and are barely mentioned in the menu. The fourth is a site that has just moved, where old addresses are closed and the new ones have not started working yet.
The fifth case is an online shop where every product has several addresses: with a colour, with a size, with a filter. The map helps the crawler see which of those variants count as primary and which are merely variations of one product. The sixth is a site with non-Latin addresses, where some pages are reachable by transliteration and some in the original script. The seventh is any site where freshness matters: a news section publishing every hour, or a catalogue whose stock changes constantly. The eighth is a resource with a big archive, where old pages have not been touched for years and the map helps the crawler tell fresh content from archived content.
- A new site with no inbound links yet
- A large catalogue where link crawling cannot keep up
- Important pages that are barely linked from anywhere
- A migration to a new domain with changed addresses
- A shop with filters, colours and product variants
- A site with transliterated addresses and Latin duplicates
Frequent mistakes when building a sitemap
The first mistake is putting everything into the map. Service addresses, search pages, filtered listings and duplicates all look like ordinary pages, but for the crawler they are noise that stretches the crawl. The second is including campaign tags: tracking parameters have no business in a sitemap, and the crawler normalises addresses to their canonical form anyway. The third is forgetting the protocol and writing addresses as /about. Such a file is formally invalid, and some search engines parse it only partially or not at all.
The fourth mistake is putting a date in the future, or refreshing it without any change. Crawlers notice quickly that lastmod moves while the content does not, and stop trusting the field. The fifth is duplicates: the same address written once with www and once without, or with a trailing slash and without, counts as two lines, though it is one document for a search engine, and the repetition lowers trust in the whole file. The sixth is uploading the file anywhere other than the root. robots.txt only works from the root, and the same applies to a sitemap referenced through a Sitemap directive.
- Service pages and internal search results end up in the map
- Addresses are listed with advertising tracking parameters
- Addresses without a protocol: /about instead of a full URL
- lastmod changes although the page itself did not
- The same address is written several times
- The file is uploaded somewhere other than the site root
A step by step walkthrough
Take a blog on the domain example.com with 24 pages. The task: build the map from a CSV export, set the change dates and keep service addresses out. Step one is the domain: type example.com so that relative addresses become absolute. Step two is the source: choose CSV, because the addresses arrived in a spreadsheet where the first column holds links and the second holds the edit date. Step three is pasting the export: the url,lastmod header is detected and skipped, and lines like https://example.com/posts/...,2026-02-11 are split into an address and a date. When the export arrives as plain text rather than CSV, it is first turned into a table, for instance with the CSV to JSON converter.
Once the list is parsed, the file is assembled. Each address gets a url block with four lines: loc with the full address, lastmod with the date from the CSV or with the common date, changefreq with the chosen frequency and priority with the chosen number. All elements are written in the order the protocol expects: loc first, then lastmod, changefreq and priority. The urlset root with the namespace is written once at the top and closed at the end. What remains is to check the counters: how many addresses made it into the file, how many duplicates were removed, and whether the weight fits inside 50 MB. If the file refuses to parse, the XML formatter usually points at the broken tag.
What happens at each step of the build
| Step | What it does | What lands in the file |
|---|---|---|
| 1 | Splitting lines | Divides the input into lines and cells |
| 2 | Header | Drops the first line if it is a table heading |
| 3 | Absolute addresses | Adds the protocol and the domain |
| 4 | Duplicates | Compares normalised addresses |
| 5 | Checks | Counts addresses and weight, compares with limits |
| 6 | XML assembly | Writes urlset and url elements |
| 7 | Date | Uses the date from the row or the common one |
| 8 | Export | Hands over the text and a file to download |
Everything happens in the memory of the tab: neither the address list nor the finished XML leaves your computer until you copy it yourself.
Sitemaps, robots.txt and meta tags: who does what
These three are often mixed up, because all of them concern search and all of them live in text files. A sitemap is the list of addresses worth visiting and worth treating as primary. robots.txt is a set of crawl restrictions, and those rules are assembled by the robots.txt generator. Meta tags such as title and description are what the robot sees once a page makes it into the results, and they are put together by the meta tag generator. The connection reads like this: the sitemap says where to go, robots.txt says where not to go, and the meta tags decide how the page will look in the results.
There is one more layer, the .htaccess file, where the server defines redirects and response codes including X-Robots-Tag; its rules are written with the .htaccess generator. A word on verification: first make sure the sitemap is reachable and served as XML, then submit it in the webmaster panel and wait for it to be processed, and only then judge it by the indexing figures. Otherwise it is easy to lose a day looking at numbers that have not been calculated yet. The response code of the map itself deserves a separate check, and the HTTP status reference tells a working file from an error page.
- A sitemap lists addresses, robots.txt forbids crawling
- Title and description decide how the page looks in the results
- Response codes and redirects live in the server configuration
- A page closed in robots.txt should not stay in the sitemap
- Check that the file is reachable before reading the statistics
- Large sites build a sitemap index instead of one giant file
Common questions about sitemaps
What is sitemap.xml and what is it for
How many addresses can one sitemap.xml hold
What values should I put in priority and changefreq
Should I fill in lastmod, and with what date
Should I submit the sitemap in robots.txt and in Search Console
Can I put addresses with parameters into a sitemap
What should I do if the sitemap lists many noindex pages
Do I have to keep updating sitemap.xml
Related tools
Favicon Generator
Make a site icon from a monogram or your own picture: favicon.ico, apple-touch-icon, Android icons, site.webmanifest and ready HTML tags
JSON Schema Generator
Build a draft JSON Schema from a JSON sample: field types, required keys, nested objects and arrays
Regex Generator
Build a regular expression from a task template or break your own pattern down into parts
Open Graph Generator
Build og:title, og:description, og:image and Twitter Card tags for the link preview on social platforms
ASCII Table
Complete ASCII reference: codes 0–127 in DEC, HEX, OCT and BIN with search by character or code
Regex Tester & Debugger
Test regular expressions with match highlighting, groups, and common patterns
HTML Meta Tag Generator
Generate SEO-optimized HTML meta tags for your website
cURL to Code Converter
Convert cURL commands to JavaScript, Python, and PHP code