Generate an XML sitemap for your website by adding page URLs and optional last-modified dates, change frequencies and priorities.
Set this and you can enter paths like /about below. Rows that are already full URLs are left exactly as typed — nothing is rewritten, and no trailing slash is added or removed.
Add a URL above and the XML appears here. The document is valid even while empty — that is what an empty urlset looks like.
One sitemap may hold 50,000 URLs and 50 MB. Past either, split the list and use a sitemap index.
URL sitemap · sitemaps.org 0.9
Generated in your browser — nothing is uploaded.
Everything runs locally in your browser. Your URL list is never uploaded to our server, never stored, and never sent to any analytics endpoint — the XML is built on this page and the download is created from it in memory.
What is an XML sitemap?
An XML sitemap is a file listing the URLs on a site that you would like search engines to know about, written in the sitemaps.org 0.9 protocol — a small, stable format that Google, Bing and others have supported for years.
At its simplest it is one root element and one entry per page:
That is a complete, valid sitemap. Everything else the format offers is optional.
It is worth being precise about what a sitemap is for. It is a discovery aid — it tells a crawler which URLs exist so they do not all have to be found by following links. It does not control crawling, it does not force indexing, and it is not a ranking factor. A well-linked site of thirty pages may see no measurable difference from adding one.
How sitemaps help search engines discover URLs
Crawlers find pages primarily by following links. That works well when every page is linked from somewhere reachable, and less well in several common situations:
Large sites, where a crawler may not reach every corner within the effort it is prepared to spend.
New sites with few or no inbound links, where there is little to follow in the first place.
Poorly linked pages — archives, deep pagination, anything reachable only through a form or a search box.
Sites that change often, where an accurate lastmod tells a crawler what is worth revisiting.
What a sitemap does not do is increase crawl budget. It helps direct the effort a search engine was already going to spend; it does not buy more of it. Nor does listing a URL oblige anyone to crawl or index it.
Sitemap XML structure
Every sitemap has the same shape: an XML declaration, a urlset root carrying the namespace, and a url element per page. Inside each url, only loc is required.
Notice the second entry. It has a lastmod and nothing else — no empty changefreq, no placeholder priority. That is deliberate and it matters: an empty element such as <changefreq></changefreq>is not “no preference”, it is invalid against the schema, and a validator will reject the file for it. This generator omits optional elements entirely rather than writing them blank.
Three other requirements are easy to miss. The file must be UTF-8. The child elements must appear in schema order — loc, lastmod, changefreq, priority. And the whole file must be valid XML, which is where escaping comes in.
loc — the URL
The only required child of a url element, and the one with the most rules attached.
Absolute. It must begin with a protocol — https://example.com/about, never /about.
Under 2,048 characters. Rarely a problem outside heavily parameterised URLs.
XML-escaped. The five reserved characters must be written as entities.
Canonical. List the version you want indexed, and only that version.
Escaping is where hand-written sitemaps most often break, and the failure is total rather than local — a single raw ampersand makes the whole file unparseable, so one bad URL takes the other forty-nine thousand with it. A query string demonstrates it:
The & between the two parameters is written &. The generator above does this for you, along with the four other reserved characters. It also rejects control characters outright, because those have no entity at all — there is no way to write them into XML, only a way to leave them out.
lastmod — when the page changed
The date the page’s content last meaningfully changed, in W3C Datetime format. This tool writes the date-only form, 2026-08-17, which is what almost every sitemap uses.
Of the three optional elements, this is the one worth getting right. Google has said it uses lastmod — but only when the values are consistently accurate.
Which is where most sitemaps go wrong. A build process that stamps every page with today’s date on every deploy is not reporting modification, it is reporting deployment. Once the dates are visibly unreliable they stop being trusted, and you have lost the one signal in the file that was being read. If you cannot produce an honest date, leaving lastmod out is better than filling it in.
changefreq — how often it changes
A hint about update frequency, taking one of exactly seven values:
Two are special in the specification: always describes a page that changes on every access, and never describes an archived URL. Neither is an instruction — the protocol itself calls the element a hint, and says crawlers may treat it as such.
In practice they largely do not treat it at all. Google has stated publicly that it ignores changefreq. It costs nothing to include and other crawlers may read it, so there is no harm in setting it — but no crawl schedule is going to change because you did.
priority — relative importance
A number from 0.0 to 1.0 saying how important a URL is relative to other URLs on the same site. The default is 0.5, so setting that value explicitly conveys nothing.
The comparison is strictly internal. It has no bearing on how your pages rank against anybody else’s, and setting every page to 1.0 — a common instinct — communicates exactly as much as setting them all to 0.5, which is nothing.
Google has stated it ignores priority as well. Like changefreq, it is part of the protocol, harmless to include, and not something to spend time tuning.
Sitemap limits
The protocol sets two ceilings on a single sitemap file:
50,000 URLs per file.
50 MB uncompressed. Sitemaps may be gzipped, but the limit applies to the file before compression.
Whichever comes first is the one that binds, and on sites with long URLs it is usually the byte limit rather than the count. A sitemap index is subject to the same ceilings, counted in sitemaps rather than URLs — so the theoretical maximum through one index is 2.5 billion URLs, which is not a limit anybody meets.
The generator above does not stop you exceeding these. It warns, shows the running byte count, and leaves the decision to you — silently truncating somebody’s list would be far worse than telling them it is too long.
Sitemap index files
When one file is not enough, you split the URLs across several and list those files in a sitemap index — a sitemap of sitemaps.
The root element is sitemapindex rather than urlset, and each entry is a sitemap rather than a url. Only loc and lastmod are permitted inside — changefreq and priority are not part of this schema at all, which is why the index mode in the tool above does not offer them.
Submit the index and search engines follow it to each sitemap, so there is only one URL to register. Splitting by section — pages, posts, products — is the usual arrangement, and it has a practical benefit beyond the size limit: when a search console reports errors, they are attributed to a specific sitemap rather than to one enormous file.
Sitemap vs robots.txt
Both live at the root of a site and both talk to crawlers, which is where the similarity ends. They do opposite jobs.
A sitemap is an invitation. Here are URLs that exist and are worth looking at.
robots.txt is a restriction. Please do not request these paths.
They connect in one place: robots.txt is the standard location to declare where your sitemap is, with a line reading Sitemap: https://example.com/sitemap.xml. Any crawler that reads robots.txt — which is all of them — picks it up without you registering anything.
A contradiction to avoid: do not list a URL in your sitemap that robots.txt blocks. That tells a search engine to look at something and then forbids it from doing so, and it shows up as an error in search consoles. A robots.txt generator handles the other half of the pair.
How to submit a sitemap
Upload the file. Usually to the root, as https://example.com/sitemap.xml. A sitemap can only contain URLs at or below its own location, so the root avoids that restriction entirely.
Serve it with an XML content type.application/xml or text/xml. Serving XML astext/html is a common cause of a sitemap that looks fine in a browser and fails in a search console.
Reference it from robots.txt. One line: Sitemap: https://example.com/sitemap.xml.
Submit it in a search console. Google Search Console and Bing Webmaster Tools both accept the URL directly, and both report parse errors and how many URLs were discovered — which is the fastest way to find out something is wrong.
Then leave it alone. Resubmitting an unchanged sitemap achieves nothing, and submitting a sitemap is not a guarantee that anything in it will be indexed — discovery and indexing are separate decisions, and the second one is not yours.
Common sitemap mistakes
Listing non-canonical URLs. Including both a page and its duplicates contradicts the canonical tags you already set.
Unescaped ampersands. The single most common cause of a sitemap that will not parse. One bad URL invalidates the entire file.
Listing pages robots.txt blocks. Contradictory instructions, reported as an error.
Including redirects and 404s. Every URL should return 200. A sitemap full of redirects wastes crawl effort on pages that are not there. The HTTP status code reference covers what the others mean.
Including noindex pages. Asking a search engine to discover something you have told it not to index.
Meaningless lastmod dates. Stamping every page with the deploy date destroys the only metadata Google reads.
Setting every priority to 1.0. A relative scale on which everything is equal carries no information.
Letting it go stale. A sitemap listing pages that no longer exist is worse than one that is merely incomplete.
Mixing hosts. Entries for a host you have not verified are generally ignored. One sitemap per host.
Frequently asked questions
What is a sitemap?
A sitemap is a file listing the URLs on a site that you would like search engines to know about, along with optional metadata about each one. It is a discovery aid: it tells a crawler which pages exist so it does not have to find them all by following links. It does not control crawling or indexing, and it is not a ranking factor.
What is sitemap.xml?
sitemap.xml is the conventional filename for an XML sitemap following the sitemaps.org 0.9 protocol. The name is only a convention — the file can be called anything, as long as you tell search engines where it is. What matters is that it is valid XML, uses the sitemaps.org namespace, and is served with an XML content type.
How do I create an XML sitemap?
Add your page URLs to the list above, optionally set a last-modified date, change frequency and priority for each, then copy or download the generated XML. Upload the file to your site, usually at the root, and reference it from robots.txt or submit it in a search console. Most CMS platforms can also generate one automatically, which is worth preferring for a site that changes often.
What URLs should be included?
Canonical URLs for pages you want discovered and that return a 200 status. Leave out redirects, error pages, pages blocked by robots.txt, pages carrying a noindex tag, and non-canonical duplicates — including a URL you have told search engines to ignore sends contradictory signals. Every URL should also be one a visitor could actually reach.
Should images be included?
Not in a standard sitemap. Images have their own extension namespace, which adds image elements inside each url entry, and video and news have similar extensions. This generator produces the core sitemaps.org format only. For most sites, images are discovered perfectly well from the pages that contain them.
What is lastmod?
lastmod is the date a page's content last meaningfully changed, in W3C Datetime format — this tool writes the YYYY-MM-DD form. Google does use it, but only if it is consistently accurate. Setting every page's lastmod to today on every rebuild is the usual mistake: once the dates are obviously unreliable, they get ignored entirely.
What is changefreq?
changefreq is a hint about how often a page changes, taking one of seven values: always, hourly, daily, weekly, monthly, yearly or never. It is a hint rather than an instruction, and Google has stated publicly that it ignores the element. It costs nothing to include and should not be expected to influence anything.
What is priority?
priority is a number from 0.0 to 1.0 indicating how important a URL is relative to others on the same site — the default is 0.5. It says nothing about your ranking against other sites, only about your own pages against each other. Google has stated it ignores the element, and setting every page to 1.0 conveys no information at all.
Do changefreq and priority actually do anything?
Little to nothing at the major search engines. Google has said plainly that it ignores both, and treats lastmod as the only sitemap metadata worth reading. They remain part of the protocol and other crawlers may read them, so including them is harmless — just do not expect a crawl schedule to change because of them.
What is a sitemap index?
A sitemap index is a sitemap of sitemaps: a file listing other sitemap files rather than pages. It uses a sitemapindex root element and permits only loc and lastmod inside each entry. You need one when a site exceeds the size limit for a single file, and it is also a tidy way to split a large site by section.
How many URLs can a sitemap contain?
A single sitemap may contain up to 50,000 URLs and must not exceed 50 MB uncompressed. A sitemap index may reference up to 50,000 sitemaps within the same 50 MB ceiling. In practice the byte limit is reached first on sites with long URLs, so both are worth watching.
Can I generate multiple sitemaps?
Yes, and for a large site you should. Split the URLs across several files — commonly by section, such as pages, posts and products — then list those files in a sitemap index and submit the index. Search engines follow the index to each sitemap, so you only need to submit one URL.
Should canonical URLs be used in sitemaps?
Yes. List the canonical version of every page and nothing else. Including both a canonical URL and its duplicates sends mixed signals about which one you want indexed, and undermines the canonical tags you have already set. One page, one URL, one entry.
How often should a sitemap be updated?
Whenever the set of URLs changes. For a site that publishes regularly, generate it automatically as part of your build or publish step; for a site that changes a few times a year, regenerating by hand is fine. A stale sitemap listing pages that no longer exist is worse than a slightly incomplete one.
Does a sitemap improve SEO?
It helps discovery, which is not the same as improving rankings. A sitemap makes it easier for a crawler to find URLs — genuinely useful for large sites, new sites with few inbound links, and pages that are not well linked internally. It is not a ranking factor, and a well-linked small site may see no measurable difference at all.
Where should sitemap.xml be placed?
Usually at the root of the domain, such as https://example.com/sitemap.xml. A sitemap can only contain URLs at or below its own location, so one placed in a subdirectory cannot list pages above it. The root is the simplest place that avoids that restriction entirely.
How do I submit a sitemap?
Two ways, and doing both is normal. Add a line to robots.txt reading “Sitemap: https://example.com/sitemap.xml”, which any crawler reading the file will pick up. Then submit the URL directly in Google Search Console or Bing Webmaster Tools, which also shows you any parsing errors and how many URLs were discovered.
What is the difference between a sitemap and robots.txt?
They do opposite jobs. A sitemap says which URLs exist and would be worth crawling; robots.txt says which paths a crawler should not request. One is an invitation, the other a restriction. They are commonly linked, since robots.txt is the standard place to declare where your sitemap lives.
Does submitting a sitemap guarantee my pages will be indexed?
No — submitting a sitemap is not a guarantee of indexing or of ranking. It helps search engines discover URLs; whether any given page is then indexed is a separate decision based on content quality, duplication, crawl budget and other factors entirely outside the file. Pages listed in a sitemap routinely go unindexed, and that is normal rather than a sign the sitemap is broken.
Why is my sitemap showing errors in Search Console?
Most often the file is not valid XML, is served with the wrong content type, or contains URLs on a different domain to the one being verified. Unescaped ampersands in query strings are a frequent cause of parse failures — this generator escapes them for you. Redirecting or 404ing URLs inside the file will also be reported.
Do URLs in a sitemap need to be escaped?
Yes. The five XML entities — ampersand, less-than, greater-than, quote and apostrophe — must be escaped inside a loc element, which matters most for URLs with query strings. A raw ampersand makes the file invalid XML and the whole sitemap will fail to parse, not just that one entry. This generator handles the escaping automatically.
Can a sitemap contain URLs from more than one domain?
Technically yes, but entries for hosts you have not verified ownership of are generally ignored. Cross-submission requires proving control of both hosts in the relevant search console. For almost every site the right answer is one sitemap per host, and this tool warns when it notices a mixture.
Is this Sitemap Generator free?
Yes. Building the XML, adding metadata, the sitemap index mode, copying and downloading are all free, with no account, no sign-up and no cap on how many URLs you add.
Is my URL list uploaded?
No. The XML is generated in your browser using JavaScript on the page. The URLs you enter are never transmitted to our server, never stored, and never sent to any analytics endpoint. You can disconnect from the network after the page loads and the generator keeps working, which is the simplest way to check the claim yourself.
Can I download the sitemap?
Yes. The download button saves the generated XML as sitemap.xml, created from a blob in your browser rather than fetched from a server. You can also copy the XML to the clipboard if you would rather paste it into an editor or straight into your deployment.
Keep going
Tools that pair with this one
Same privacy model — everything below runs in your browser too.