Sitemap Validator

Inspect XML sitemap files and sitemap indexes client-side. Troubleshoot syntax formatting, missing namespace prefixes, relative URL path problems, and validate SEO best practices.

Loading interactive Monaco sitemap auditor workbench...

Comprehensive Guide to XML Sitemap Protocols & Validations

XML Sitemaps act as a blueprint for search engine bots (like Googlebot and Bingbot). They tell search crawlers exactly which pages on your website are high-priority, when they were last updated, and how often they change. Submitting a corrupted or improperly formatted sitemap can waste your site's crawl budget, lead to search indexing drop-offs, or cause crawlers to reject your index files completely.

Understanding the XML Sitemap Protocol Tags

The official Sitemap Protocol defines several core elements under the http://www.sitemaps.org/schemas/sitemap/0.9 namespace:

  • <loc>: The absolute destination URL of the page. It must begin with http or https and match your domain schema.
  • <lastmod>: The last modification timestamp formatted in W3C Datetime syntax (e.g. YYYY-MM-DD). This informs crawlers whether a page needs to be re-scanned.
  • <changefreq>: How frequently the page is likely to change (e.g. always, hourly, daily, weekly, monthly, yearly, never). Note that this serves as a hint, not a strict command.
  • <priority>: The priority of the URL relative to other pages on your site, ranging from 0.0 (lowest) to 1.0 (highest). The default priority is 0.5.

Advanced Sitemap Namespace Extensions

For specialized media formats, Google supports namespaced extensions that can be embedded directly inside standard sitemap <url> blocks:

  • Google Image Sitemaps (image:image): Helps Google discover graphics, infographics, and photos that might otherwise be hidden by JavaScript loaders. It requires image:loc.
  • Google Video Sitemaps (video:video): Allows video files to appear in Google Video search results. Requires video:thumbnail_loc, video:title, and video:description.
  • Google News Sitemaps (news:news): Essential for news publishers to get articles listed inside Google News feeds. Must contain publication name, language, date, and title.
  • Hreflang Alternate Links (xhtml:link): Informs search engines about language or regional variants of a URL to serve the correct version to global searchers.

Common Sitemap Failures & Formatting Mistakes

When auditing your website sitemaps, look out for these frequent mistakes:

  • Relative URL Paths: All URLs must be absolute. Writing <loc>/about</loc> will fail parsing.
  • Mixed Protocols (HTTP/HTTPS): Sitemaps should consistently list HTTPS versions of URLs. List only canonical URLs; avoid redirect loops or non-canonical redirects.
  • Namespace Declarations: When using image, video, news, or XHTML tags, you must declare their respective XML schema namespace prefixes on the root tag.
  • Sitemap Index Directive Errors: Priority and changefreq tags must only reside in URL sitemaps. Placing them inside sitemap index files is disallowed.

Frequently Asked Questions

An XML Sitemap Validator is a specialized tool that parses your sitemap files and checks them against the official sitemap schema guidelines and search engine recommendations. It checks for XML syntax formatting errors, relative URL bugs, invalid change frequencies, incorrect priority values, and duplicates, helping you fix issues before submission.

According to Google and the official Sitemap Protocol, a single sitemap file must not exceed 50,000 URLs and its uncompressed file size must be under 50 megabytes (50MB). If your sitemap exceeds either of these limits, you must split it into multiple sitemaps and list them in a sitemap index file.

A URL Sitemap (wrapped in a <urlset> tag) contains the actual list of page links on your website along with search instructions (lastmod, priority). A Sitemap Index (wrapped in a <sitemapindex> tag) acts as a directory that lists other sitemap URLs. Sitemap Indexes are used to group multiple sitemaps for large websites.

No. Fragment identifiers (like #section) are strictly disallowed by search engines in sitemap URLs. Crawlers ignore page fragments during crawling because they represent segments of a single document rather than unique target crawl URLs. Including them is parsed as an error.

There are two primary methods: 1) Add a directive pointing to your absolute sitemap URL inside your robots.txt file (e.g. Sitemap: https://example.com/sitemap.xml). 2) Submit your sitemap path directly inside search consoles, such as Google Search Console or Bing Webmaster Tools.