XML Sitemap Validator
XML Sitemap Validator
Validate your XML sitemap structure, find errors, and analyze every URL instantly
| # | URL (loc) | Lastmod | Changefreq | Priority | Status |
|---|
| Element | Required | Valid Values | Description |
|---|---|---|---|
<urlset> | â Yes | With xmlns attribute | Root element, must include the sitemaps.org namespace |
<url> | â Yes | One per page | Container element for each page's data |
<loc> | â Yes | Full absolute URL | The canonical URL of the page (must start with http/https) |
<lastmod> | âŦ Optional | YYYY-MM-DD or ISO 8601 | Date the page was last modified â helps Google prioritize crawling |
<changefreq> | âŦ Optional | always, hourly, daily, weekly, monthly, yearly, never | Hint to crawlers how often content changes (not strictly enforced) |
<priority> | âŦ Optional | 0.0 â 1.0 | Relative importance of this URL compared to others on the site |
How to Validate Your XML Sitemap and Fix Common Errors
đ Key Takeaways
- The
<loc>element is the only required field inside each<url>block - A sitemap can contain a maximum of 50,000 URLs and must be under 50 MB uncompressed
- Incorrect lastmod dates can mislead Googlebot and waste crawl budget
- Priority and changefreq are hints to crawlers â Google does not guarantee it follows them
- Always submit your sitemap in Google Search Console after making changes
An XML sitemap is one of the most direct ways to communicate with search engines about your website's structure. It tells Google, Bing, and other crawlers exactly which pages exist, when they were last updated, and how important they are relative to each other. But a sitemap with syntax errors, invalid dates, or missing required tags can actually do more harm than good â it may confuse crawlers or get silently ignored. Using a free XML sitemap validator before submitting to Google Search Console is one of the simplest habits that separates well-optimized sites from the rest.
What Does an XML Sitemap Validator Check?
This tool performs a comprehensive set of checks across your sitemap XML:
- Structure validation â confirms the XML is well-formed and uses the correct sitemaps.org namespace
- Required elements â checks that every
<url>block contains a<loc>element - URL format â verifies each URL is absolute and starts with http or https
- Lastmod format â validates that dates follow the W3C datetime format (YYYY-MM-DD or ISO 8601)
- Priority range â confirms priority values fall between 0.0 and 1.0
- Changefreq values â checks against the allowed set (daily, weekly, monthly, etc.)
- URL count limit â warns if your sitemap exceeds Google's 50,000 URL limit
- Duplicate URLs â flags identical loc values appearing more than once
How to Use This XML Sitemap Validator
Paste your sitemap XML directly into the text area, or click one of the preset buttons to load a sample. Once your content is in place, click Validate Sitemap. The tool immediately parses the XML, runs all checks, and displays a validation score, a list of all errors and warnings with explanations, an analytics breakdown of priority and changefreq distribution, and a searchable table of every URL in the sitemap with its field values and individual status.
What a Valid XML Sitemap Looks Like
A correctly formatted sitemap follows this structure:
<?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-07-03</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://example.com/about/</loc>
<lastmod>2026-06-15</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>
Most Common XML Sitemap Errors
After reviewing dozens of sitemaps, these are the errors that show up most frequently:
- Missing XML declaration â the
<?xml version="1.0" encoding="UTF-8"?>line at the top is often omitted - Wrong namespace â the
xmlnsattribute in<urlset>must exactly matchhttp://www.sitemaps.org/schemas/sitemap/0.9 - Relative URLs in loc â writing
/about/instead ofhttps://example.com/about/is invalid - Invalid lastmod format â formats like "July 3, 2026" or "03-07-2026" are not valid; use YYYY-MM-DD
- Priority out of range â values above 1.0 or below 0.0 are invalid
- Duplicate URLs â the same loc appearing more than once wastes crawl budget
Sitemap Index Files
If your site has more than 50,000 pages, you need a sitemap index file instead of a single sitemap. A sitemap index references multiple individual sitemap files, each containing up to 50,000 URLs. The structure uses <sitemapindex> as the root element instead of <urlset>, with each child sitemap listed as a <sitemap> element containing a <loc> pointing to the individual sitemap file.
Frequently Asked Questions
How many URLs can an XML sitemap contain?
A single XML sitemap file can contain a maximum of 50,000 URLs and must be no larger than 50 MB when uncompressed. If your site has more pages, split them across multiple sitemap files and reference them all from a sitemap index file.
Does Google always follow the priority and changefreq values I set?
Not necessarily. Google treats these values as hints rather than instructions. Googlebot makes its own decisions about crawl frequency and importance based on many signals. That said, keeping these values accurate and consistent is still considered good practice.
Do I need to include every page on my site in the sitemap?
No â you should only include pages you want Google to index. Exclude pages with noindex tags, paginated URLs, admin pages, duplicate content, and any URLs blocked by robots.txt. A smaller, cleaner sitemap with only canonical, indexable URLs is more effective than one that includes everything.
Found this sitemap validator useful? Bookmark this page and validate your sitemap every time you make structural changes to your site â it only takes seconds.
Comments (0)
Leave a Comment