How to Generate a Sitemap for Any Website (Without Touching Code)
A sitemap tells Google which pages exist on your site. Here's how to generate one automatically — and the right way to submit it to Search Console.
What is a sitemap and why does Google need one?
A sitemap is an XML file that lists the canonical URLs you want search engines to know about. It can include an accurate last-modified date. Google uses sitemaps as a discovery hint, especially for large, new, media-heavy, or weakly linked sites, but a sitemap does not guarantee crawling or indexing.
Google can also discover pages through crawlable links. A small, well-linked site may not need a sitemap, although submitting one makes discovery and monitoring easier.
What a valid sitemap looks like
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://yoursite.com/</loc>
<lastmod>2025-06-01</lastmod>
</url>
<url>
<loc>https://yoursite.com/about</loc>
<lastmod>2025-05-15</lastmod>
</url>
</urlset>
A single sitemap can contain up to 50,000 URLs and must be no larger than 50MB uncompressed. For larger sites, use a sitemap index. Google ignores priority and changefreq, so this example omits them.
How to generate a sitemap automatically
The easiest way is to use an automated sitemap generator that crawls your site and builds the XML for you. Peak Visibility does this as part of its full SEO package — paste your URL, and your sitemap is generated alongside your meta tags, schema markup, and robots.txt.
Other options:
- WordPress — Yoast SEO or Rank Math generate and update sitemaps automatically at
/sitemap.xml - Shopify — Automatically creates a sitemap at
yourstore.com/sitemap.xml - Squarespace / Wix / Webflow — Built-in sitemap at
/sitemap.xml, but limited customization - Static sites / custom builds — Use Peak Visibility to crawl and generate
Paste your URL for a free, instant SEO check — no signup required.
How to submit your sitemap to Google
- Go to Google Search Console and add your property if you haven't already
- In the left sidebar, click Sitemaps
- Enter your sitemap URL (usually
https://yoursite.com/sitemap.xml) - Click Submit
Google will show the sitemap status within a few hours. The "Discovered URLs" count confirms how many pages were found. If pages stay stuck as "discovered" without ever getting crawled, see why that happens and how to fix it.
Common sitemap mistakes to avoid
- Including 404 or redirect URLs — Only include live, indexable pages
- Blocking the sitemap in robots.txt — Make sure your robots.txt doesn't block the
/sitemap.xmlpath - Not updating it when you publish new pages — If you're on a CMS, use a plugin that auto-updates; if not, re-run your sitemap generator
- Omitting canonical pages — If you use canonical tags, only include the canonical URL in your sitemap
Generate yours now
Paste your URL into Peak Visibility and get a complete, ready-to-submit sitemap.xml in under 3 minutes — along with your meta tags, schema markup, and robots.txt. Free for up to 5 pages, no credit card required.
Sources and further reading
Technical claims in this guide were checked against primary documentation. Search features can change, so verify important implementation details before deploying.
Paste your URL for a free, instant SEO check — no signup required.