XML Sitemap Generator — Free Online Tool

An XML sitemap generator turns a list of absolute website URLs into a sitemap file that search engines can read. Enter the canonical addresses you want discovered, review duplicates and invalid entries, and download the XML file for placement at your website root. The file describes your chosen URLs; it does not force crawling or indexing.

XML Sitemap Generator

Loading tool controls…

XML Sitemap Generator At a Glance

An XML sitemap is a structured inventory of URLs you want search engines to consider. This generator takes one complete URL per line and produces a standard XML urlset document. It checks that every entry uses an HTTP or HTTPS address, removes fragments, and avoids duplicate entries. Its default setting requires URLs to share a hostname, so an accidentally pasted competitor domain does not slip into the output. The resulting document can be saved with an .xml extension and uploaded to the public part of your website. Because the generator receives only the URLs you submit, it cannot discover missing pages by crawling a site.

How to Generate an XML Sitemap

Start with the canonical versions of your pages, such as https://example.com/, https://example.com/services/, and https://example.com/contact/. Paste each on its own line. Leave the same-host requirement enabled for an ordinary single-domain website. If you know when every supplied page last changed significantly, you may enter a verified date in YYYY-MM-DD format; otherwise leave it empty. Select Generate sitemap, read any skipped-entry warnings, and open the XML result before downloading it. A clean output with three valid addresses has three <url> records, not three nested sitemaps or a collection of browser links.

Which Pages Should Appear in a Sitemap

A sitemap is most useful when it lists canonical, publicly accessible pages that you want indexed. Include important pages even if they are reached through internal navigation; the sitemap complements links rather than replacing them. Leave out private dashboards, login redirects, internal search results, thank-you pages, and unfinished resources that should not appear in search. A page marked noindex does not become eligible for indexing just because it appears in the sitemap. For a large site, use the published content registry or CMS database to prepare URLs instead of copying every hyperlink from a navigation menu. Listing a page you do not maintain can create stale sitemap entries over time.

Understanding the XML Structure

The file starts with an XML declaration and an element using the namespace http://www.sitemaps.org/schemas/sitemap/0.9. Under the root, each page has a separate url element containing a loc address. An optional lastmod field can describe a genuine modification date. The ampersand in a page address such as ?color=blue&size=large must be escaped inside XML, and this generator performs that escaping. Sitemap XML is not HTML; copying ordinary anchor elements or writing malformed tags will not create a valid submission. The generated file contains only fields supplied here and deliberately avoids invented priorities or change frequencies.

Canonical URLs and Consistent Hostnames

Choose one preferred hostname and protocol for each page before generating a sitemap. If your site resolves both www.example.com and example.com, list the canonical version used by the site rather than treating both as separate pages. HTTP addresses that redirect to HTTPS are similarly less useful than the final HTTPS addresses. The same-host check uses the hostname of the first accepted URL, so begin with an address from the website you intend to submit. A canonical tag checker can identify conflicting declarations in page source; those declarations should align with the URLs you ultimately place in the sitemap.

When to Include Last-Modified Dates

The last-modified date is an assertion about meaningful changes to a page, not the time you generated the sitemap. Changing only a footer copyright year or building the site again does not necessarily justify updating every URL timestamp. An accurate lastmod value may help crawlers decide whether revisiting a document is worthwhile, but a misleading date can weaken the usefulness of that signal. The date field on this utility applies the same date to every generated entry; use it only when that is genuinely accurate. For an active site with different publishing dates, a sitemap produced directly from page-level update records is preferable.

Handling Duplicate URLs and Query Parameters

The generator treats complete normalized URLs as entries and removes exact duplicates. A tracking link such as ?utm_source=newsletter and its clean base address may still be different strings, however, because each has a distinct query. That does not mean both belong in your sitemap. Remove advertising and campaign parameters from page URLs unless those parameters truly produce distinct canonical content. Review sorting and filtering URLs, print views, and pagination carefully: some are valuable destinations, while others create unnecessary duplicates. The generator reports invalid lines instead of guessing the intended address, so typos in slugs and escaped spaces are visible for manual correction.

Where to Upload the XML File

For a conventional static website, put the generated XML file where it can be requested through a public URL such as https://example.com/sitemap.xml. A site can instead expose a sitemap index pointing to several individual sitemaps. After uploading, open the public file in a browser and ensure it returns XML rather than a login page, directory listing, HTML error, or redirected download. Check for the correct content type and compare the visible addresses with your canonical URLs. Add a sitemap declaration in robots.txt where appropriate, and submit the sitemap location through your search-engine webmaster tools; no special submission file must be hidden inside your Astro source tree.

How Sitemaps Work With Robots Rules

Sitemaps suggest URLs worth discovering; robots rules influence which paths a crawler may access. They solve different problems. If a page is prohibited by a robots rule, an engine may be unable to retrieve the page even when its address appears in the sitemap. If a page contains a noindex instruction, crawling may be necessary to observe it. Test relevant paths with the robots.txt tester before changing access rules. You should also keep internal navigation working, because crawler discovery and user navigation should not depend solely on an XML inventory.

Sitemap Limits and Large Websites

A standard uncompressed sitemap is limited to 50,000 URL entries and 50 MB. The generator checks those constraints and will reject excessive content rather than produce a deceptively successful oversized file. Sites with more pages should split their inventories into multiple files and use a sitemap index. Splitting by content type or manageable URL ranges can make maintenance easier, but there is no ranking bonus attached to the naming scheme. Avoid exporting huge lists of parameter combinations from faceted filters merely to fill the permitted limit. The purpose is an accurate, maintainable representation of the important canonical URLs.

Check Your Generated File Before Submission

The output is syntactically constructed XML, but site-specific correctness still needs review. Inspect the first URL, the last URL, the hostname, and the escaped query strings. Confirm that each page is live, returns an appropriate HTTP status, and matches its canonical hint. Running the file through the XML sitemap validator checks the document structure and highlights duplicates or suspicious entries. That validator does not fetch every listed page, so combine structural checking with actual live-site verification. Update the file when a URL is created, deleted, redirected, or significantly changed rather than relying on a stale launch-day list.

Common Sitemap Mistakes to Avoid

A leading relative path such as /about/ is not a valid full loc address here; include the scheme and hostname. HTML-escaped text pasted directly into the URL input may be misinterpreted, so enter the actual URL and allow the generator to escape XML markup. Watch for malformed dates, mixed HTTP and HTTPS hostnames, and URLs that are intentionally noindexed. An XML sitemap is not a ranking shortcut, a traffic report, or proof of ownership of every listed site. Use it as one accurate source of discoverable page addresses and keep the actual website technically healthy.

Frequently Asked Questions About XML Sitemap Generator

Does a sitemap guarantee Google will index every page?

No. Search engines decide which pages to crawl and index using many signals. A sitemap helps discovery but cannot override noindex instructions, canonical preferences, server errors, or a decision that a page does not warrant indexing.

Can the generator crawl my website automatically?

No. Paste the URLs you want included. The tool converts your list to XML and validates the entries; it does not crawl links, inspect robots rules, or check whether each page is live.

Should www and non-www addresses both appear?

Normally list only the preferred canonical hostname. If the other version redirects to it, putting both variants into a sitemap adds needless duplication and may complicate monitoring.

Can I include query parameters in the URL?

Yes, if the parameterized address is a canonical page worth indexing. Advertising attribution parameters and duplicate sort or filter variants usually should not be included.

Is lastmod required?

No. Leave it empty if you do not have reliable modification dates. An accurate omitted date is preferable to an invented date attached to every page.

Where should I upload the sitemap?

Use a publicly accessible URL under the website you own, such as /sitemap.xml. Confirm the response returns actual XML and then submit that address through the appropriate search-engine webmaster interface.

What if the website has more than 50,000 pages?

Split the inventory into multiple compliant sitemap files and use a sitemap index to reference them. This utility intentionally limits a single generated URL sitemap.

Do XML sitemaps replace internal links?

No. Normal crawlable navigation and relevant links in your content still matter. A sitemap is supplemental discovery information and does not repair an inaccessible site structure.