How to validate a sitemap
- Enter the full URL of your sitemap, such as
https://example.com/sitemap_index.xml. - Press Run check.
- Read the summary, which ends with either Passed or Review required.
The URL you enter is sent to the WP Sekar Tools backend on Cloudflare, which makes the request for you. Only public websites can be checked. Private IP addresses, local hostnames and non-standard ports are refused.
What gets checked
- Final URL and HTTP status. A sitemap must return 200. Redirects are followed and shown.
- XML syntax. One unescaped ampersand or a stray character before the XML declaration makes the whole file unreadable.
- Root element and namespace. The file must be a
urlset(a list of pages) or asitemapindex(a list of sitemaps), using the officialsitemaps.orgnamespace. - Entries. The number of
urlorsitemapentries. A sitemap can hold at most 50,000. - Invalid locations. Each entry needs exactly one
locwith a full, valid HTTP or HTTPS URL. - Unexpected elements. Elements in the sitemap namespace that do not belong at that level.
The tool reads files up to 1 MB. For security, files with a DOCTYPE declaration are refused.
Where to find your WordPress sitemap
- WordPress core:
/wp-sitemap.xml - Yoast SEO and Rank Math:
/sitemap_index.xml - All in One SEO:
/sitemap.xml
Your robots.txt file usually lists the sitemap too. Open /robots.txt and look for a Sitemap: line.
Sitemap index files
Most WordPress SEO plugins create a sitemap index that links to separate sitemaps for posts, pages, categories and so on. When you check the index, the tool validates the index file only. It does not open each child sitemap. Check the important ones, such as post-sitemap.xml, separately.
Common sitemap problems
A blank line or PHP warning before the XML. This usually comes from a plugin or a theme's functions.php file and makes the XML invalid. The fix is to find the file that outputs the stray text.
Cached HTML instead of XML. Some caching setups serve a cached HTML page or a minified version at the sitemap URL. Exclude sitemap URLs from page caching and minification.
URLs that should not be there. Redirected, noindexed or 404 pages do not belong in a sitemap. A sitemap should list only canonical URLs that return 200. Spot-check a few entries with the indexability checker.
Mixed protocols or domains. After a move to HTTPS or a new domain, old URLs sometimes remain in the sitemap.
Two sitemaps from two plugins. If WordPress core and an SEO plugin both generate sitemaps, submit only one to Google.
After validating
Submit the sitemap URL in Google Search Console under Sitemaps, and in Bing Webmaster Tools. Search Console then reports how many URLs it discovered and any errors it finds. A valid sitemap does not guarantee indexing, but it helps search engines find new and updated pages faster. The guide on how to index your website quickly explains the rest of the process.
Frequently asked questions
Is this a full schema validation?
No. It checks the structure that matters most in practice. It does not validate every optional tag, such as lastmod formats or image extensions, against the official XSD.
Does a sitemap need lastmod dates?
They are optional. Google uses lastmod when it is accurate, so only include it if it reflects real content changes.