XML Sitemap Complete Guide: Structure, Best Practices, and Submission
What a Sitemap Does
An XML sitemap tells search engine crawlers which pages exist on your site, their relative priority, and when they were last modified. Sitemaps are especially valuable for large sites, new sites with few inbound links, and pages with rich media (video, images).
XML Sitemap Structure
A valid sitemap uses the sitemaps.org protocol: <urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>. Each URL is a <url> block with <loc> (required), <lastmod> (optional, ISO 8601 format), <changefreq> (optional hint), and <priority> (optional, 0.0–1.0). Crawlers treat changefreq and priority as hints, not commands.
Sitemap Index for Large Sites
A single sitemap file is limited to 50,000 URLs or 50MB uncompressed. Larger sites use a sitemap index — a master file listing individual sitemap files. This allows splitting by content type (pages, posts, images, videos).
Submission to Search Engines
Google: submit via Google Search Console → Sitemaps. Bing: Bing Webmaster Tools. Also reference your sitemap in robots.txt: Sitemap: https://yourdomain.com/sitemap.xml. This allows any crawler that reads robots.txt to discover your sitemap.
Frequently Asked Questions
Generate your XML sitemap
Create a valid, submission-ready sitemap with the free Sitemap Generator.
Open Sitemap Generator