Make a sitemap.xml and submit it to Google
Build a sitemap.xml by hand, with your CMS or from a list of URLs, then submit it in Search Console. Which URLs to include and the usual mistakes.
To make a sitemap.xml, list the URLs you want in Google, save them in an XML file at the root of your site, and submit it in Search Console. If you already have the URLs, paste them into the sitemap.xml generator, one per line, and download the file. Submitting is a hint, not a command: Google says it does not guarantee it will download the sitemap or use it for crawling.
What is a sitemap.xml, and when do you need one?
A sitemap is a file where you list the pages and files on your site so search engines can crawl it more efficiently. If your pages link to each other well, Google can usually find most of them without one. By its own documentation, you may not need one if your site is small (roughly 500 pages or fewer) and well linked. It helps if the site is large, is new with few links pointing to it, or has a lot of video, image, or news content.
Which URLs go in a sitemap?
The ones you want to appear in search results. Google generally shows the canonical URL, so list that one instead of its variants. Use full, absolute URLs (https://www.example.com/page, not /page), because Google will try to crawl them exactly as written.
How do you create a sitemap.xml?
With your CMS
According to Google, most content management systems generate a sitemap automatically or have a plugin for it. If yours does, check its settings before building anything by hand.
From a list of URLs
- Open the sitemap.xml generator.
- Paste the URLs, one per line. Blank lines and lines that start with
#are ignored. - Read the checks: the tool flags lines that are not a valid URL and removes duplicates. It does not crawl your site; it uses only what you paste.
- If you need them, turn on the last modified date (
lastmod), change frequency, or priority. They start turned off. - Download
sitemap.xmland upload it to the root of your site.
By hand
A minimal sitemap is a UTF-8 file with one <url> entry and its <loc> for each page:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.example.com/</loc>
</url>
<url>
<loc>https://www.example.com/contacto</loc>
</url>
</urlset>How do you submit a sitemap to Google?
There are three ways, per Google’s documentation. The first is the Sitemaps report in Search Console, which also shows when Googlebot read it and any processing errors. The second is the Search Console API. The third is adding a Sitemap: line with the full URL to your robots.txt:
Sitemap: https://www.example.com/sitemap.xmlIf you do not have a robots.txt yet, build one with the robots.txt generator. To see what each file does, read robots.txt vs sitemap.xml.
Limits and common mistakes
- Size: one sitemap holds up to 50 MB uncompressed or 50,000 URLs. Past that, split it into several and submit a sitemap index.
- Encoding: the file must be UTF-8.
- Location: unless you submit it through Search Console, a sitemap only affects files in its folder and below. At the root it affects the whole site, which is where Google recommends putting it.
- Relative URLs or the wrong version: write every URL in full and, if your site works with and without
www, use the one you declared canonical. If your site has several languages, also read common hreflang mistakes.
Frequently asked questions
Do I have to have a sitemap?
No. According to Google, a small, well-linked site may not need one. It helps most on large sites, new sites with few links, or sites with a lot of media.
Where do I upload sitemap.xml?
To the root of your site, for example https://www.example.com/sitemap.xml. Google recommends this because a sitemap at the root can affect every file on the site.
How many URLs can a sitemap hold?
Up to 50,000 URLs or 50 MB uncompressed, whichever comes first. With more, split it into several sitemaps and, if you like, submit an index file.
Does submitting a sitemap guarantee Google will index my pages?
No. Google treats it as a hint: it does not guarantee it will download the sitemap or use it to crawl the URLs.
How do I submit a sitemap to Google?
Use the Sitemaps report in Search Console, the Search Console API, or a Sitemap: line in your robots.txt.
Does the tool crawl my site to find the URLs?
No. It builds the sitemap from the URLs you paste, one per line. You decide what goes in.
Build your sitemap.xml now
Paste your URLs and download the file. Free, in your browser.
Generate sitemap.xml →Related tools
- Sitemap.xml generator — Builds the file from a list of URLs.
- Robots.txt generator — Add the Sitemap: line to your robots.txt.
- Hreflang generator — Tags for multilingual sites.
Sources
- Google Search Central, “Build and Submit a Sitemap” (accessed November 2, 2026).
- Google Search Central, “What Is a Sitemap” (accessed November 2, 2026).