Sitemap Validator

Loading Sitemap Validator…
1

Enter your sitemap URL

An XML sitemap lists the URLs you want indexed. If it is malformed or oversized, search engines may skip it, leaving pages undiscovered.

2

Review the validation report

The tool fetches and parses your sitemap, checks it against the sitemap protocol, and reports the URL count plus any errors, all through a request hardened against SSRF.

What Is a Sitemap Validator?

A Sitemap Validator examines an XML sitemap to determine whether it follows the required technical structure and can be processed correctly. It fetches the sitemap, parses the XML, counts the listed URLs, and reports structural or protocol-related errors that may prevent search engines from reading the file as intended.

An XML sitemap provides search engines with a list of URLs that a website owner wants them to discover and consider for crawling. It can also contain supporting information, such as the date on which a page was last significantly modified. A sitemap does not guarantee that every listed URL will be crawled or indexed, but it provides search engine crawlers with useful discovery signals.

A malformed sitemap may contain broken XML, missing required elements, invalid URL entries, incorrect namespaces, encoding problems, or too many URLs. Validating the file before submitting it helps identify these problems before they affect sitemap processing.

How to Validate an XML Sitemap

Enter the complete URL of the sitemap you want to check. The address will usually resemble https://example.com/sitemap.xml or point to a sitemap index such as https://example.com/sitemap-index.xml.

The tool retrieves and parses the file, checks its structure against the Sitemap protocol, and reports the number of URLs together with any detected errors. The request is hardened against Server-Side Request Forgery risks when accessing the address provided for analysis.

Review the results to confirm that the document can be parsed and that the expected number of URLs has been found. If an error is reported, correct the relevant XML element, URL, namespace, encoding, or file-size problem, publish the updated file, and repeat the validation.

Validation is particularly valuable after launching a new website, changing the URL structure, completing a migration, updating a sitemap generator, or dividing a large sitemap into several files.

What Does a Valid XML Sitemap Contain?

A standard XML sitemap should begin with an opening <urlset> element and end with a closing </urlset> element. The <urlset> element must declare the Sitemap protocol namespace.

Each page is represented by a parent <url> element. Every <url> element must contain a <loc> child element that specifies the complete address of the page. The URLs should be fully qualified and include the protocol and hostname, such as https://www.example.com/category/page.

Optional elements may provide additional information. The <lastmod> element can indicate when the page was last meaningfully modified. Other protocol elements include <changefreq> and <priority>, although support and use of optional fields can vary between search engines.

The sitemap file must use UTF-8 encoding, and values containing special characters must be properly escaped. Incorrectly encoded ampersands, quotation marks, angle brackets, or non-ASCII characters can make otherwise correct URL entries invalid.

Common Sitemap Validation Errors

Malformed XML is one of the most common problems. Missing closing tags, incorrect nesting, unescaped characters, duplicate declarations, or incomplete elements can prevent the document from being parsed.

A missing or incorrect namespace may also cause the file to fall outside the expected Sitemap protocol structure. A standard URL sitemap should declare the protocol namespace within the <urlset> element.

Each URL entry must contain a valid <loc> value. Relative paths such as /products/item should not be used in place of complete URLs. Google recommends listing fully qualified, absolute addresses because crawlers attempt to access URLs exactly as they appear in the sitemap.

Other problems can include malformed URLs, unsupported protocols, inconsistent hostnames, invalid date formats, unreachable sitemap files, unexpected HTML responses, redirects, or server errors. A URL that displays correctly in a browser interface is not necessarily a valid XML sitemap; the server must return the expected sitemap content.

Sitemap URL and File-Size Limits

A single sitemap can contain no more than 50,000 URLs and must not exceed 50 MB when uncompressed. If either limit is exceeded, the URLs must be divided across multiple sitemap files.

The individual files can then be grouped through a sitemap index. A sitemap index uses a <sitemapindex> root element and contains a separate <sitemap> entry for each referenced sitemap. Each entry includes a <loc> element pointing to the corresponding sitemap file.

Dividing a large website into several sitemaps can also make monitoring easier. For example, an e-commerce website may maintain separate sitemaps for products, categories, editorial content, images, and different markets. This allows teams to review submission and indexing patterns for each group more clearly.

Sitemap files can be compressed with gzip to reduce transfer size. However, the file must still remain within the applicable size limit after it has been uncompressed.

Which URLs Should Be Included in a Sitemap?

A sitemap should generally contain the canonical URLs that you want search engines to consider for indexing. Google recommends including the fully qualified versions of the URLs that you want to appear in search results.

Avoid filling the file with redirecting URLs, error pages, duplicate parameter variations, non-canonical addresses, staging pages, or URLs intentionally excluded from indexing. Including conflicting URLs can make the sitemap less useful as a clear signal of the website’s preferred indexable pages.

The URLs listed in the sitemap should also remain accessible through the website’s navigation and internal linking structure where practical. A sitemap supports discovery, but it is not a substitute for crawlable internal links or a coherent website architecture.

The <lastmod> value should reflect a meaningful content change rather than being updated automatically every time the sitemap is generated. Reliable modification dates can help search engines understand which pages may need to be crawled again.

Sitemap Validation and Search Console

A successful validation confirms that the file follows the expected XML and Sitemap protocol structure. It does not guarantee that all listed pages will be indexed or that they meet every search engine requirement.

After validating the sitemap, submit it through Google Search Console and review its processing status. Search Console can report whether Google retrieved the sitemap, how many URLs were discovered, and whether submission-specific problems occurred.

Indexing depends on factors beyond the sitemap, including crawl accessibility, canonicalisation, robots directives, response codes, page quality, duplication, and the overall value of the content. The sitemap should therefore be reviewed as one part of a broader technical SEO process.

Regular validation is especially useful after website migrations, HTTPS transitions, domain changes, CMS updates, URL restructures, or major content removals. These changes can introduce outdated URLs and structural errors even when the sitemap is generated automatically.

Why Sitemap Validation Matters for SEO

An accurate sitemap gives search engines a cleaner list of the pages a website considers important. This can be particularly useful for large websites, recently launched pages, extensive content archives, e-commerce catalogues, news platforms, and websites with pages that are difficult to reach through internal links.

Validation helps prevent technical mistakes from weakening that discovery signal. It can reveal a malformed file, unexpected URL count, broken XML structure, or protocol problem before the sitemap is submitted or recrawled.

The Sitemap Validator should be used alongside crawling tools, log analysis, Search Console reports, canonical checks, robots.txt reviews, and indexability tests. Together, these controls provide a clearer view of whether search engines can discover, access, and interpret the intended pages.

Track the digital heartbeat with Kriko

Subscribe to receive curated insights, news, and ideas shaping the digital landscape.