How-to Guides Web & HTTP

How to Create and Submit a Sitemap (and an llms.txt)

Build an XML sitemap from your list of URLs, validate it, publish it at /sitemap.xml, reference it in robots.txt and submit it to the search engines, plus an optional llms.txt for AI assistants.

Last reviewed:

AdSense Placeholder
Slot: header_reference_page
On this page

Steps

  1. List your canonical URLs

    Collect only the pages you want in search results: real pages that return 200, use the preferred (canonical) address and are not blocked or marked noindex.

  2. Generate the sitemap

    Paste the URLs into the XML Sitemap Generator, optionally set a last-modified date, and download the file. Past 50,000 URLs or 50 MB it splits the list into several files plus a sitemap index.

  3. Validate it

    Run the result through the Sitemap XML Validator to catch bad URLs, wrong namespaces, duplicates and size limits before search engines do.

  4. Publish and reference it

    Upload it to the site root as /sitemap.xml and add a Sitemap: line to robots.txt. The robots.txt Generator can write that file for you.

  5. Submit it to the search engines

    Add the sitemap URL in Google Search Console and Bing Webmaster Tools, then check back for errors and for how many URLs were read.

  6. Optionally add an llms.txt

    The llms.txt Generator builds a short Markdown file at /llms.txt that points AI assistants to your best pages. It is a proposal, not a standard, and it does not replace the sitemap.

What you need

The list of your public page URLs and access to upload files to your site root.

Examples

A two-page sitemap produced by the generator:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/</loc>
    <lastmod>2026-10-28</lastmod>
  </url>
  <url>
    <loc>https://example.com/about</loc>
    <lastmod>2026-10-28</lastmod>
  </url>
</urlset>

And an llms.txt produced by the llms.txt generator:

# Example

> Example is a small library for parsing dates.

## Docs

- [Getting started](https://example.com/docs/start): Install and first steps
- [API reference](https://example.com/docs/api)

Common pitfalls

  • A sitemap should list canonical URLs only; do not include redirects, error pages or parameter variants.
  • URLs must be absolute and start with the same scheme and host as the sitemap location.
  • A lastmod date is only useful if it is accurate; search engines ignore it when it changes on every request.
  • Multilingual sites should also declare language versions; see How to Add hreflang Tags to a Multilingual Site.

Try these tools

See also

  • Glossary Sitemap
    An XML sitemap is a file listing a site's URLs, with optional last-modified dates, to help search engines find and crawl pages.
  • Glossary robots.txt
    robots.txt is a public text file at a site's root that tells crawlers which paths they may or may not fetch.
  • Glossary Canonical URL
    A canonical URL is the preferred address of a page when several URLs show the same content, declared with <link rel="canonical">.
  • Guide How SEO Meta Tags Work
    Title, description, canonical, hreflang, robots.txt.
  • How-to How to Add hreflang Tags to a Multilingual Site
    Tell search engines which language version of a page belongs to which audience: list every version, make the tags reciprocal.

Frequently Asked Questions

No. It helps search engines discover and re-crawl pages, which matters most for new, large or poorly linked sites. It does not rank pages higher by itself.

A single file may hold up to 50,000 URLs and 50 MB uncompressed. Larger sites use several files listed in a sitemap index.

AdSense Placeholder
Slot: footer_leaderboard