Create a Website Sitemap Complete Guide
Step-by-step guide to create a website sitemap with tools, timelines, pricing, and best practices.
Introduction
If you want to create a website sitemap, this guide shows exactly what to build, why it matters, and how to implement it for beginners, entrepreneurs, and developers. A well-structured sitemap speeds up indexation by search engines, helps content planning, and reduces crawling waste for large sites. It is one of the highest-impact technical SEO tasks you can complete in a day or two for a small site.
This article covers sitemap concepts, the types of sitemaps used on modern sites, step-by-step implementation for static and dynamic sites, timelines based on site size, tools with pricing, and a practical checklist you can follow. Examples use real numbers: 10-20 page brochure sites, 200 product e-commerce catalogs, and 50,000+ page enterprise sites. You will get a short XML (Extensible Markup Language) sitemap example, common pitfalls, and a 4-step action plan to get a sitemap live this week.
Read this if you build with HTML (HyperText Markup Language), CSS (Cascading Style Sheets), JavaScript, WordPress, Shopify, or a custom framework and want practical, measurable steps to produce an accurate sitemap that search engines and humans can use.
Overview and Purpose of Sitemaps
A sitemap is a file or page that lists the pages on your site so search engines and visitors can find them. There are two main forms: XML sitemaps for search engines and HTML sitemaps for people. Both serve different purposes but often work together.
XML sitemaps (Extensible Markup Language) are machine-readable and include metadata such as last modification date, priority, and change frequency. HTML sitemaps are simple web pages that improve user navigation and internal linking. For SEO (Search Engine Optimization) the XML sitemap is critical because it tells search engine crawlers which URLs exist and which are a priority.
Examples with numbers:
- Small brochure site: 10 to 25 pages. A single XML sitemap is sufficient. Timeline: create and submit in 1 day.
- Mid-size site: 200 to 2,000 pages (product catalogs, blogs). Use multiple sitemaps by category and a sitemap index file. Timeline: 1 to 2 weeks.
- Large site: 10,000 to 1,000,000+ pages. Use programmatic sitemaps, pagination, and URL parameter management. Timeline: 4 to 8 weeks, with ongoing automation.
Why this matters:
- Faster indexation: New or updated pages are discovered sooner.
- Crawl budget efficiency: Search engines spend limited resources on larger sites. Correct sitemaps reduce wasted crawling on low-value pages.
- Error detection: Submitting sitemaps to Google Search Console exposes 404s, redirects, and blocked pages.
- Site planning: A sitemap surfaces structural problems and duplicate content.
Actionable insight: For a 200-page e-commerce site, split the XML sitemaps into 5 files of 40 URLs each and use a sitemap index. category URLs) and reduces troubleshooting time.
Principles and Types of Sitemaps
Sitemaps are not one-size-fits-all.
Principles:
- Accuracy: Only list canonical URLs you want indexed.
- Freshness: Update lastmod timestamps or refresh sitemaps when content changes.
- Simplicity: Keep the sitemap readable and avoid excessive meta-attributes that are ignored by crawlers.
- Limits: Each XML sitemap file can contain up to 50,000 URLs and must be no larger than 50 MB uncompressed. Use a sitemap index file when you exceed these limits.
Types of sitemaps with use cases:
- XML sitemap: Primary format for search engines. Use for pages, images, videos, and news. Include lastmod where reliable.
- HTML sitemap: A human-facing page for navigation and usability; good for small sites or content hubs.
- Image sitemap: Either embedded in XML or separate; useful if you rely on image search for traffic.
- Video sitemap: Contains additional metadata for video content and improves video discoverability.
- News sitemap: Required for Google News inclusion; includes publication date and article metadata.
- Mobile and AMP sitemaps: If you use Accelerated Mobile Pages (AMP) or mobile-specific content, include separate sitemaps.
Examples and numbers:
- Blog with 350 posts: Use a single XML sitemap or split into 8 sitemaps of ~44 posts each to keep files small for easier updates.
- Marketplace with 75,000 product pages: Generate programmatic sitemaps grouped by category or date, each under 50,000 URLs, and reference them in a sitemap index file.
Practical metadata guidance:
- lastmod: Use ISO 8601 format (YYYY-MM-DD) and only include if you can update it reliably via your CMS or build pipeline.
- changefreq (change frequency): Optional and often ignored; use it conservatively or omit it.
- priority: A value between 0.0 and 1.0. Use sparingly; it rarely influences crawling decisions directly.
Actionable insight: If you have variable content freshness (e.g., user profiles rarely change, products change daily), schedule sitemap regeneration: daily for products, weekly for evergreen pages, monthly for static policy pages. Use automation (cron, CI/CD) to rebuild sitemaps on publish events.
How to Create a Website Sitemap
This step-by-step walkthrough shows how to create a sitemap for small, medium, and large sites, including code examples and submission workflows.
Step 1: Inventory and canonicalization
- Crawl or export a list of URLs from your CMS (Content Management System) or web server.
- Decide on canonical URLs: prefer https, remove trailing slashes or set a consistent pattern.
- Example: For 200 product URLs, ensure only product pages under https://example.com/product/ are included, not query strings like ?ref=campaign unless canonicalized.
Step 2: Choose type and structure
- Small static site (10-50 pages): Create a single XML sitemap at /sitemap.xml.
- Medium site (50-3,000 pages): Group by content type: /sitemaps/posts.xml, /sitemaps/products.xml, and use /sitemap_index.xml.
- Large site (>50,000 URLs): Programmatically generate sitemaps daily and use a sitemap index referencing many sitemap files.
Step 3: Generate the sitemap
- Manual generation: For small sites, create an XML file. Example snippet:
<urlset xmlns="sitemaps.org
<url>
<loc>https://example.com/</loc>
<lastmod>2025-03-12</lastmod>
<priority>1.0</priority>
</url>
</urlset>
- CMS plugins: WordPress plugins like Yoast SEO and Rank Math generate sitemaps automatically. Yoast SEO has a free version and a premium tier starting around $99/year for one site.
- Command-line tools: Screaming Frog SEO Spider can export sitemaps; it has a free crawl limit and a paid license (approx. 209 GBP/year as of 2024).
- Programmatic generation: Use backend scripts (Node.js, Python) that query your database and write sitemap XMLs. For example, a Node.js script that runs on publish events and appends new URLs to a daily sitemap file.
Step 4: Compress and host
- Compress large sitemaps with gzip (file becomes sitemap.xml.gz). Search engines accept gzipped sitemaps.
- Host them at the site root or a stable URL: or s3.amazonaws.com
Step 5: Register and monitor
- Submit to Google Search Console and Bing Webmaster Tools. Both are free.
- Monitor indexation, errors, and warnings. For example, if Search Console shows 50 URLs blocked by robots.txt, fix robots rules within 48 hours.
Step 6: Automate updates
- Small site: Regenerate on content change with a webhook and commit to your static host; timeline: immediate to 24 hours.
- Medium/large site: Use daily cron jobs or publish-event triggered builds. For a 2,000-page store with hourly inventory changes, regenerate product sitemaps every 6-12 hours.
Actionable insight: For a 200-page e-commerce site, plan:
- Day 1: Export URL list and canonicalize (4 hours).
- Day 2: Generate and validate XML sitemaps, compress, and host (4 hours).
- Day 3: Submit to Google Search Console and fix initial errors (2 hours).
- Ongoing: Schedule daily sitemap builds for product pages.
When and How to Use Sitemaps:
workflows and timelines
Use sitemaps at three main stages: launch, ongoing publishing, and site migrations. Each stage has a different workflow and timeline.
Launch workflow (new site or major redesign):
- Timeline: 1 to 7 days depending on site size.
- Actions:
- Finalize canonical URLs and robots.txt.
- Generate an initial XML sitemap and HTML sitemap for users.
- Submit to Google Search Console and request indexing for key landing pages.
- Monitor for 2 weeks to ensure main pages are indexed.
Ongoing publishing workflow (content additions, product updates):
- Timeline: hourly, daily, or weekly depending on content velocity.
- Actions:
- For low velocity (blogs, 1-4 posts/month): regenerate sitemap weekly or on publish.
- For medium velocities (catalogs with dozens of updates/day): regenerate product sitemaps daily or multiple times per day.
- For high velocities (marketplaces, user-generated content): implement incremental sitemaps or date-based sitemaps (e.g., sitemaps per day) and automate via CI/CD pipelines.
Migration workflow (domain changes, protocol switch, major URL structure changes):
- Timeline: 2 to 8 weeks (planning, testing, rollout).
- Actions:
- Prepare redirect map (301 rules) for all changed URLs.
- Submit new sitemap before or immediately after rollout.
- Keep old sitemap and redirect map active to allow search engines to re-index.
- Monitor indexation and search traffic weekly; expect fluctuations for 2-6 weeks.
Practical monitoring metrics and targets:
- Index coverage: Aim for >90% of pages in sitemap to be indexed for high-quality pages.
- Crawl errors: Aim for zero server-side (5xx) errors over a rolling 14-day period.
- Indexing lag: New core pages should be indexed within 2-7 days for small sites and 1-2 weeks for large sites if sitemaps and Search Console submissions are used.
Actionable insight: Track these with a dashboard (Google Data Studio or Looker Studio) that pulls Search Console metrics. Set alerts for spikes in 4xx/5xx errors or when indexed URL counts drop by more than 10%.
Tools and Resources
Use combinations of free and paid tools depending on scale. Below are recommended tools, what they do, and approximate pricing where relevant.
Google Search Console (free)
Submit sitemaps, view index coverage, and debug errors.
Availability: Free; requires site verification.
Bing Webmaster Tools (free)
Similar capabilities for Bing and Yahoo; useful for additional indexing feedback.
Yoast SEO (WordPress plugin)
Auto-generates XML sitemaps; free version available; Yoast SEO Premium starts at ~$99/year per site (price may change).
Best for WordPress users.
Rank Math (WordPress plugin)
Free feature-rich sitemap generation; paid plans for advanced features starting around ~$59/year.
Screaming Frog SEO Spider
Desktop crawler to build sitemaps, find broken links, and do audits.
Free version with limited crawl size; paid license approx. 209 GBP/year as of 2024.
XML-Sitemaps.com
Online generator for small sites; free up to 500 URLs and paid options for larger sites (one-time fees or subscriptions depending on volume).
Ahrefs / SEMrush / DeepCrawl (paid)
Site auditing and monitoring platforms; include sitemap generation and issue tracking. Pricing: Ahrefs and SEMrush start around $99/month for entry plans; DeepCrawl and enterprise-level tools vary.
AWS S3 / Cloudflare / Netlify hosting (hosting and CDN options)
Host sitemap files on a durable CDN. Costs: S3 storage is pennies per GB; Netlify offers a free tier and paid plans starting ~$19/month; Cloudflare has a free tier.
CI/CD tools (GitHub Actions, GitLab CI)
Automate sitemap generation on publish. GitHub Actions has a free tier with usage limits; paid plans for larger usage.
Quick comparison (small summary):
- Small static site: XML-Sitemaps.com or manual XML + GitHub Pages or Netlify (free tier).
- WordPress site: Yoast SEO or Rank Math plugin (free to start).
- Medium site: Screaming Frog + scheduled exports + automation into a sitemap index.
- Large enterprise: Programmatic sitemaps generated by backend pipelines + monitoring via Ahrefs/DeepCrawl.
Actionable insight: If you run an e-commerce site with 5,000 SKUs, budget roughly $100 to $500/year for tooling (Screaming Frog license and a monitoring tool) plus hosting costs. For enterprise sites with custom integrations, expect $2,000 to $10,000/year for crawling and monitoring subscriptions.
Common Mistakes and How to Avoid Them
- Including non-canonical or blocked URLs
- Problem: Listing URLs that are redirected, blocked by robots.txt, or not canonical confuses search engines.
- Fix: Only include canonical URLs and check robots.txt and meta robots before generating sitemaps.
- Not updating sitemaps on content change
- Problem: Search engines receive stale signals and may drop or delay indexing of new content.
- Fix: Automate sitemap regeneration on publish events or use date-based sitemaps for frequently changing content.
- Exceeding sitemap limits without indexing a sitemap index
- Problem: Putting more than 50,000 URLs in a single XML file or exceeding 50 MB can break processing.
- Fix: Split into multiple sitemaps and use a sitemap index file. Example: For 250,000 URLs, create 5 files of 50,000 each and reference them in sitemap_index.xml.
- Using changefreq and priority improperly
- Problem: These optional tags are often misused and ignored by crawlers, causing maintenance overhead without benefit.
- Fix: Prefer lastmod only and ensure it is accurate. Avoid relying on changefreq and priority for crawling behavior.
- Forgetting image or video metadata
- Problem: If your site depends on image or video search, missing specialized sitemap entries reduces discoverability.
- Fix: Add image and video sitemap entries or include images/videos in the standard XML sitemap using the correct namespace and metadata.
Actionable insight: Add a simple pre-deploy check in your CI pipeline that validates sitemap URL counts, file sizes, and that all listed URLs return a 200 status or appropriate redirect. Fail the build if critical errors are detected.
FAQ
Do I Need a Sitemap for a Small Website with 10 Pages?
Yes. Even small sites benefit because a sitemap ensures search engines discover all pages, especially deep content that lacks strong internal links. It takes less than an hour to create and submit.
How Often Should I Update My Sitemap?
Update the sitemap whenever URLs are added, removed, or significantly changed. For product-heavy sites update daily; for blogs update on publish or weekly. Automation is the best practice.
What is the Difference Between an XML Sitemap and an HTML Sitemap?
An XML sitemap is machine-readable and informs search engines about pages and metadata. An HTML sitemap is a human-facing page that improves navigation and internal linking. Use both when helpful.
Can Submitting a Sitemap Improve My Search Rankings?
Submitting a sitemap helps indexing and discoverability, which can indirectly improve ranking by ensuring pages can be evaluated. It does not directly raise rankings; content quality and backlinks remain primary ranking factors.
How Do I Handle Paginated Content in Sitemaps?
List canonical URLs for each paginated page if they provide unique, indexable content. Consider using rel=“next” and rel=“prev” for paginated series where applicable and include the paginated URLs in your sitemap split by ranges (e.g., pages 1-100 per sitemap file).
Next Steps
- Audit and inventory (1 day)
- Crawl your site with Screaming Frog (free mode for small sites) or export URLs from your CMS. Identify canonical URLs and pages you want indexed.
- Generate and host sitemaps (1-3 days)
- For WordPress, enable Yoast or Rank Math sitemaps. For static sites, build sitemap.xml and sitemap_index.xml, gzip, and host at your root.
- Submit and monitor (1 week)
- Submit the sitemap to Google Search Console and Bing Webmaster Tools. Check index coverage daily and fix errors within 48 hours for critical pages.
- Automate and scale (ongoing)
- Add sitemap generation to your CI/CD pipeline or publish webhook. For larger sites, schedule daily builds and use monitoring tools like Ahrefs or DeepCrawl to track indexation and crawl errors.
End checklist (copy before you start):
- Export URL list and confirm canonical patterns
- Choose sitemap structure (single, split, index)
- Generate XML sitemap(s) and compress if needed
- Host at stable URL and add to robots.txt if required
- Submit to Google Search Console and Bing Webmaster Tools
- Set up automation for sitemap updates on publish
- Monitor index coverage and fix issues weekly
This guide provides the process, tools, and practical timelines to create, submit, and maintain sitemaps for sites of any size. Follow the checklist and automate where possible to keep search engines informed of your content.
Further Reading
- Create a Website Github Using Github Pages
- Create a Website HTML Step by Step Guide
- Create a Website Wordpress Step-by-Step Guide
- How to Build a Website for Free From Scratch
Sources & Citations
Recommended Web Hosting
The Best Web Hosting - Free Domain for 1st Year, Free SSL Certificate, 1-Click WordPress Install, Expert 24/7 Support. Starting at CA$2.99/mo* (Regularly CA$8.49/mo). Recommended by WordPress.org, Trusted by over 5 Million WordPress Users.
