XML Sitemap for a Website
An XML sitemap tells search engine crawlers which pages to index, how often they change, and their relative importance. Each URL entry includes the location, last modification date, change frequency hint, and a priority from 0.0 to 1.0. The XML formatter validates the namespace declarations and ensures the file is well-formed before you submit it to Google Search Console. Keep your sitemap under 50,000 URLs and 50 MB — larger sites need a sitemap index file that references multiple sitemap files.
<?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-04-01</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://example.com/about</loc>
<lastmod>2026-03-15</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://example.com/blog</loc>
<lastmod>2026-04-01</lastmod>
<changefreq>daily</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc>https://example.com/contact</loc>
<changefreq>yearly</changefreq>
<priority>0.5</priority>
</url>
</urlset>FAQ
- Does Google use priority and changefreq?
- Google largely ignores changefreq and priority as ranking signals, preferring its own crawl frequency determination. Include them for other search engines, but do not rely on them to influence Google crawl rates.
- How do I handle image and video sitemaps?
- Google supports image and video sitemap extensions using additional XML namespaces. Add the image: namespace and include <image:image> elements within each <url> block to help Google index your media.
- Where do I submit my XML sitemap?
- Submit via Google Search Console under Sitemaps, and reference it in your robots.txt file with Sitemap: https://example.com/sitemap.xml so all crawlers can discover it automatically.
Related Examples
RSS feeds let readers subscribe to your blog or podcast using any feed reader wi...
SVG Icon XML StructureSVG icons are XML documents that scale perfectly at any size and can be styled w...
SOAP Request Envelope XMLSOAP (Simple Object Access Protocol) is the XML-based messaging format used by e...