Inspector de Sitemap XML
Inspecciona sitemap XML para duplicados, fechas inválidas, URLs no absolutas y mezcla de protocolos
Inspecting XML Sitemaps for Technical SEO Quality
XML sitemaps tell search engines which pages exist on your site, when they were last modified, and their relative priority. A well-structured sitemap accelerates indexing of new content, helps crawlers discover pages not reachable through internal linking, and provides change frequency hints that influence recrawl scheduling. However, sitemaps with duplicate URLs, invalid dates, non-absolute URLs, or protocol mixing create confusion for crawlers and can waste your crawl budget on error pages or redirect chains.
The Sitemap XML Inspector parses your sitemap files using the browser's native DOMParser API, counting URLs, detecting duplicates, validating lastmod dates against W3C format requirements, identifying non-absolute URLs, and flagging HTTP/HTTPS protocol inconsistencies. All analysis runs entirely in your browser — your sitemap content never leaves your device.
Duplicate URL Detection
Duplicate URLs in sitemaps waste crawl budget and can confuse search engines about which version of a URL is canonical. The inspector detects several forms of duplication:
- Exact duplicates: The same URL appearing multiple times in the sitemap
- Trailing slash variants:
/productsand/products/both listed - Protocol variants: HTTP and HTTPS versions of the same URL
- www variants:
www.example.comandexample.comversions - Parameter variants: Same path with different query parameter orderings
Each duplicate represents a page that crawlers may attempt to index twice, potentially creating duplicate content issues. The inspector reports the total duplicate count and lists specific URLs that appear more than once for easy cleanup.
Date Format Validation (W3C Datetime)
The <lastmod> element must use W3C Datetime format (a subset of ISO 8601).
Search engines use these dates to prioritize recrawling recently modified pages. Invalid dates
are silently ignored, meaning your freshness signals are lost:
2024-03-15— Valid: date only (YYYY-MM-DD)2024-03-15T10:30:00+00:00— Valid: full datetime with timezone2024-03-15T10:30:00Z— Valid: UTC datetime03/15/2024— Invalid: US date format not accepted2024-3-15— Invalid: month must be zero-paddedMarch 15, 2024— Invalid: human-readable format not accepted
The inspector validates every lastmod entry and reports dates that do not conform to the W3C specification, including future dates that indicate generation errors and dates older than the domain registration (likely placeholder values).
URL Quality and Protocol Consistency
Sitemap URLs must be absolute and use a consistent protocol. The inspector checks for:
-
Relative URLs: Paths like
/products/widgetwithout domain are invalid in sitemaps and will be rejected by search engines. - Protocol mixing: HTTPS sites listing HTTP URLs create redirect chains that waste crawl budget and signal configuration issues.
- Non-canonical URLs: URLs that redirect to other locations should not be in the sitemap — only final destination URLs belong there.
- URL count limits: Individual sitemap files should not exceed 50,000 URLs or 50MB uncompressed. The inspector reports when these limits are approached.
Code Examples
Sitemap XML with Common Issues
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/products</loc>
<lastmod>2024-03-15</lastmod>
</url>
<url>
<loc>https://example.com/products/</loc> <!-- Duplicate: trailing slash -->
<lastmod>2024-03-15</lastmod>
</url>
<url>
<loc>http://example.com/about</loc> <!-- Protocol mismatch: HTTP -->
<lastmod>03/15/2024</lastmod> <!-- Invalid date format -->
</url>
<url>
<loc>/contact</loc> <!-- Relative URL: invalid -->
<lastmod>2030-01-01</lastmod> <!-- Future date: suspicious -->
</url>
</urlset>
<!-- Inspector findings:
- WARN: Duplicate URL detected (trailing slash variant): /products vs /products/
- ERROR: Protocol mismatch: http://example.com/about (site uses HTTPS)
- ERROR: Invalid lastmod format: "03/15/2024" (expected W3C datetime)
- ERROR: Relative URL detected: /contact (must be absolute)
- WARN: Future lastmod date: 2030-01-01 (likely a placeholder)
- INFO: Total URLs: 4, Unique: 3, Duplicates: 1
-->Standards & Specifications
- Sitemaps XML Protocol — Defines the XML schema, URL limits, and format requirements for sitemap files
- W3C Datetime Format — Specifies the date-time format required for lastmod elements in sitemaps