What a sitemap actually does
A sitemap is a file (usually XML) that lists the URLs on your website. It tells search engine crawlers where to find your pages and optionally when they were last updated and how often they change.
Two types exist:
- XML sitemap (
sitemap.xml): Primarily for search engines. Contains URLs, last-modified dates, and change frequency. - HTML sitemap: A page on your site listing all pages. Primarily for human visitors who can't find what they're looking for via navigation.
When Google says you actually need a sitemap
According to Google's own documentation, you benefit from a sitemap if:
- Your site is large — more than a few hundred pages where Googlebot might miss some
- Your site is new — few external links pointing to it, so crawlers rarely visit
- You have rich media content — videos, images you want indexed in Google Images
- Your site has isolated pages — pages not well-linked from other pages on your site
For small, well-linked sites (under 100 pages), a sitemap provides minimal SEO benefit. Googlebot will find your pages by following links. But having one doesn't hurt, and the setup takes 5 minutes.
XML sitemap format
<?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-06-01</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://example.com/about</loc>
<lastmod>2026-05-15</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://example.com/blog/post-title</loc>
<lastmod>2026-06-01</lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
</urlset>Important notes on the fields:
loc: Required. Must be a full URL including https://lastmod: Optional but recommended. Use the actual last modification date — don't set everything to today's datechangefreq: Optional and largely ignored by Google — it's advisory onlypriority: Optional. Relative priority between 0.0 and 1.0. Google largely ignores this too — focus on having accuratelastmodinstead
Generating a sitemap free
The free sitemap generator creates XML sitemaps for any site — enter your domain and it will attempt to crawl and discover pages automatically:
- Enter your website URL
- Set the maximum pages to crawl (start with 500 for most sites)
- Click Generate — the tool crawls your site following internal links
- Download the generated
sitemap.xml - Upload to your server at
https://yourdomain.com/sitemap.xml
Platform-specific sitemap generation
- WordPress: Yoast SEO and Rank Math both auto-generate sitemaps at
/sitemap_index.xml. No manual work needed. - Shopify: Auto-generates at
/sitemap.xml. Nothing to configure. - Wix: Auto-generates and submits to Google automatically in modern Wix.
- Next.js: Use the
next-sitemappackage or the built-in Metadata API'ssitemap.tsroute. - Static sites: Generate during build with a script or plugin depending on your generator (Gatsby, Eleventy, Hugo all have sitemap plugins).
Submitting to Google Search Console
- Go to Google Search Console (search.google.com/search-console)
- Select your property
- In the left sidebar: Indexing → Sitemaps
- Enter your sitemap URL (e.g.,
sitemap.xml) and click Submit
Google will process the sitemap within hours and start crawling the listed URLs. You can return to the Sitemaps section to see how many URLs were discovered vs. indexed.
Also add your sitemap URL to your robots.txt file:
User-agent: *
Allow: /
Sitemap: https://yourdomain.com/sitemap.xmlSitemap index files (for large sites)
A single sitemap file can contain up to 50,000 URLs and must be under 50 MB uncompressed. Large sites use a sitemap index — an XML file that lists multiple sitemaps:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://example.com/sitemap-pages.xml</loc>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap-blog.xml</loc>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap-products.xml</loc>
</sitemap>
</sitemapindex>Related tools
- Free Sitemap Generator — crawl your site and generate a sitemap.xml instantly
- Free Meta Tag Generator — generate SEO meta tags for pages in your sitemap
Written by Achraf A., founder of TheFreeAITools.