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.

Everything runs in your browser — your data is never sent to any server.

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

  1. Enter the domain and, if you need one, a common date for the pages
  2. Choose the source: a manual list or a CSV export
  3. Paste the addresses, one per line or separated by commas
  4. Set the priority, the change frequency and optionally keep the home page only
  5. 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

LineWhat it meansComment
<loc>https://example.com/</loc>Address of the home pageThe mandatory element of every record
<lastmod>2026-01-15</lastmod>Date of the last changeFormat YYYY-MM-DD, change only on real edits
<changefreq>weekly</changefreq>Declared update frequencyGoogle does not use this value
<priority>0.5</priority>Declared page priorityGoogle ignores this value
xmlns=...sitemap/0.9The namespace of the protocolWithout it the file is not a sitemap
<urlset>The root element of the mapContains all url elements
Sitemap: https://example.com/sitemap.xmlA link to the map from robots.txtThe simplest way to connect it
<sitemapindex>An index of maps for large sitesReferences several sitemap.xml files
50,000 URLsThe maximum number of addresses per fileGoing over it is a protocol error
50 MBThe maximum file size before compressionMeasured on the uncompressed file
https://example.com/page?ref=1An address with a parameterSuch addresses do not belong in a sitemap
https://example.com/pageThe canonical addressThis 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

StepWhat it doesWhat lands in the file
1Splitting linesDivides the input into lines and cells
2HeaderDrops the first line if it is a table heading
3Absolute addressesAdds the protocol and the domain
4DuplicatesCompares normalised addresses
5ChecksCounts addresses and weight, compares with limits
6XML assemblyWrites urlset and url elements
7DateUses the date from the row or the common one
8ExportHands 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

It is an XML file with a list of site addresses that is handed to search crawlers as a hint: these pages exist, and these are the important ones. A sitemap does not forbid crawling, it guides it. For the crawler it is a way to learn about pages it never reached through links, which matters most on large sites where a full crawl takes days. The second purpose is to declare which address is canonical when several variants point at the same page. The format is described by the sitemaps.org protocol and is understood by Google, Yandex and Bing. Building a sitemap from a live example is walked through in the article on sitemap.xml and the site map. The difference between the two common XML shapes is covered in the article on XML and JSON.

How many addresses can one sitemap.xml hold

The protocol allows up to 50,000 addresses in one file, and the uncompressed file size must stay under 50 MB. These are limits of the format itself, not settings of your hosting. When there are more, the addresses are split across several files, and those files are listed in a separate sitemap index that points to the others. The index itself may contain at most 50,000 file references, so very large projects end up with a two level structure. The generator checks both boundaries as you type, so you see the warning before uploading anything.

What values should I put in priority and changefreq

It does not matter much, because the values carry no weight. Google says plainly in its documentation that it ignores the priority value in a sitemap and does not use changefreq while crawling: the robot decides for itself how often to come back. Yandex behaves the same way. The fields stay in the file for protocol compatibility and for third party tools that read them. The practical conclusion is simple: do not spend time sorting out priorities, set uniform values and spend the effort on what actually matters, namely the list of addresses and the change dates.

Should I fill in lastmod, and with what date

Fill it in when it is honest. The lastmod value is the time the page content last changed, not the time you remembered to rebuild the sitemap. The format is simple: YYYY-MM-DD, optionally with hours and minutes. If a page changed in March and not in October, write March, because a truthful date is worth more than a fresh one. A version with full time works more precisely, but for most sites the date alone is enough. A different rule matters more: if the date changes without the content changing, the signal loses its value and the robot stops trusting it.

Should I submit the sitemap in robots.txt and in Search Console

Do both, because they are separate channels. The Sitemap directive in robots.txt hands the crawler the address of the map on every visit, and all three major search engines read it. In Search Console or Yandex Webmaster you additionally submit the file by hand, and there you also see the statistics: how many addresses were read, how many were indexed, which ones fell out. Neither channel replaces the other: the directive works forever, while the submission is what gives you reporting. Large sites often keep several maps, one per section, and list them in a sitemap index.

Can I put addresses with parameters into a sitemap

Generally no. Addresses carrying parameters, tracking tags or sort options generate an endless number of near identical variants, and the robot then spends its crawl budget on them instead of on useful pages. A sitemap should list canonical addresses only: no campaign tags, no sorting, no page numbers, no session identifiers. When several variants point at the same page, the sitemap must contain one of them, the one you consider primary, and every variant should carry a canonical tag. Pages closed in robots.txt should not be in the sitemap either, since that is a direct contradiction and search engines resolve it in unpredictable ways. The list of blocked addresses is easiest to keep next to the robots.txt generator.

What should I do if the sitemap lists many noindex pages

Remove them. A page with a noindex tag does not belong in the map: robots.txt tells the crawler where to go and the sitemap tells it where to look, and when the same address appears in both places with opposite meanings the outcome depends on which one the crawler reads first. Usually the block wins, but relying on that is unwise. A practical routine: export the indexing report from Search Console, look at which addresses fell out, and clean them from the list. A sitemap of 300 addresses that are all indexed is more useful than one of 5000 where half get discarded.

Do I have to keep updating sitemap.xml

Updating helps, but it does not have to be frequent. A sitemap is a description of the structure, not a task list, so it is worth rebuilding when new pages appear or old addresses change. Some large projects regenerate the file on every deploy, which is perfectly normal practice, but doing it by hand every day makes no sense. Keep in mind that crawlers cache the sitemap: Google may fetch it only every few days, so do not expect an instant reaction to a changed file.

Related tools