Free Tool

Is your XML sitemap valid?

Enter a sitemap URL or a site URL. We read the file, check it against the sitemaps.org protocol and Google's sitemap rules, and test the status of up to 20 of its URLs. Paste XML instead to check a draft.

Free. No sign-up. We fetch the file once and store nothing.

Your sitemap lists redirects?

The redirect checker in the AY Rank app shows every hop, status code and final page for up to 10 URLs at once. Paste the flagged URLs to see where they end up.

Open the redirect checker
1

Enter a URL

A sitemap URL, or a home page. For a home page we read the Sitemap lines in robots.txt, or try /sitemap.xml.

2

We read the file

Up to 10 MB, gzip included, with an XML reader that never loads a DTD or an external entity.

3

We run the checks

Format, namespace, loc, size limits, hosts and lastmod. For an index, the same checks on up to 10 child sitemaps.

4

We test a sample

Up to 20 URLs spread across the file. Redirects and answers other than 200 are flagged.

A sitemap tells Google which URLs you want crawled and shown. Google calls it a hint, uses lastmod only when it is accurate, and reports broken files, redirects and URLs it cannot crawl in Search Console. Check the file before Google does.

How this works

  1. The file must be UTF-8 XML whose root is urlset or sitemapindex, in the namespace http://www.sitemaps.org/schemas/sitemap/0.9. Any other root or namespace is an error. (sitemaps.org protocol; Search Console Sitemaps report, Incorrect namespace)
  2. Every url or sitemap entry needs one loc: an absolute URL that starts with http or https and is under 2,048 characters. Values must be entity escaped, so & is written &. (sitemaps.org protocol, XML tag definitions and Entity escaping)
  3. One file can list at most 50,000 URLs and be at most 50 MB (52,428,800 bytes) uncompressed. A sitemap index has the same limits. Gzip is allowed, and the limit counts the unpacked size. (sitemaps.org protocol; Google, Build and submit a sitemap)
  4. URLs must use the same protocol and host as the sitemap, so www.example.com and example.com differ. URLs above the sitemap's folder are a warning, because Google drops that rule for sitemaps you submit in Search Console. When we found the sitemap in a site's robots.txt, that site's URLs count as in scope. (sitemaps.org, Sitemap file location and cross submits; Google, Build and submit a sitemap)
  5. lastmod must be W3C Datetime: a date like 2026-11-11, or a date and time with a time zone like 2026-11-11T09:30:00+00:00. Google rejects a time without a time zone, and the sitemaps.org schema rejects a year or a month alone. We also flag dates in the future, since lastmod should be the date the page last changed. (W3C Date and Time Formats; Search Console Sitemaps report, Invalid date; sitemaps.org protocol)
  6. Google ignores priority and changefreq, and uses lastmod only when it is consistently accurate. We still check that their values are valid and list them as a note. (Google, Build and submit a sitemap)
  7. A sitemap index lists sitemaps, not other indexes. We read at most 10 child sitemaps and run the same checks on each. Google reports an index that lists itself or another index as Nested sitemap indexes. (Google, Manage your sitemaps with a sitemap index file; Search Console Sitemaps report)
  8. We check at most 20 URLs, picked evenly from the start to the end of the file. Each gets a HEAD request, or a GET for the first 1 KB when HEAD fails, and we follow up to 5 redirects. A URL that redirects or does not answer 200 is flagged, because Google asks for the final URLs and reports URLs it cannot crawl. (Search Console Sitemaps report, URLs not followed and URLs not accessible)
  9. Limits of this tool: we read at most 10 MB of each file, before and after unpacking, which is below the 50 MB protocol limit, so a bigger file is checked up to that point only. Each request gets 6 seconds and a whole check 20 seconds, with at most 4 requests at a time. The API allows 30 requests per 60 seconds per IP, shared with our other free tools.
  10. We fetch only public http and https addresses on ports 80 and 443, and check every redirect hop again. The XML reader never loads a DTD or an external entity. It knows only the five built-in XML entities and numeric character references.
  11. Paste mode runs in your browser and checks the XML only. It sends nothing and requests no URL, so the host check compares every URL with the first one.

Sources

We read each page below on 2026-11-11. Every check on this page comes from one of them.

A valid sitemap can still miss pages

Our own 2026-07-30 audit of ayrank.com found that a code change had cut our sitemap to 97 URLs. It had dropped all 420 city service pages, and the file was still valid XML. A validator checks what a sitemap lists. It cannot see what is missing, so compare the URL count with the number of pages you expect.

Frequently Asked Questions

How do I check if my XML sitemap is valid?

Enter the sitemap URL, or your home page, and press Validate sitemap. The tool reads the file, checks it against the sitemaps.org protocol and Google's sitemap rules, lists each problem with examples and a line number, and tests up to 20 of its URLs.

What lastmod format does Google accept?

W3C Datetime: a date like 2026-11-11, or a date and time with a time zone like 2026-11-11T09:30:00+00:00. Google's Search Console help calls a time without a time zone an invalid date. lastmod should be the date the page last changed in a significant way, not the date the file was built.

How many URLs can one sitemap hold?

50,000 URLs and 50 MB (52,428,800 bytes) uncompressed. Gzip is allowed, but the limit applies to the unpacked size. For more, split the file and list the parts in a sitemap index, which has the same limits.

Does Google use priority and changefreq?

No. Google's sitemap guide says it ignores both. They are still part of the protocol, so this tool checks that their values are valid and lists them as a note, not an error.

Can a sitemap list URLs on another domain or subdomain?

Not by default. The protocol says every URL must use the same protocol and host as the sitemap, so www.example.com and example.com count as different hosts. Google allows other hosts when you verify them in Search Console or point to the sitemap from each site's robots.txt.

Want us to fix this for you?

This checks one sitemap. Our Technical SEO work checks your sitemaps, robots.txt and canonical tags together across the whole site, so search engines and AI crawlers reach the pages you want found.