Skip to Content
OpportunitiesTechnicalIssue ReferenceSitemapSitemap is not a readable XML sitemap

Sitemap is not a readable XML sitemap

What it is

A sitemap Asky read is not a usable XML sitemap. Either the response is not a sitemap at all, typically a web page or an error page, or it is a sitemap in which some <url> entries have no <loc>, the element that holds the page address.

Why it matters

Crawlers skip what they cannot parse. A sitemap URL that serves a web page gives them no pages to find, and an entry without <loc> is dropped. Google  and Bing  read XML sitemaps that follow the sitemaps.org protocol , in which each <url> needs a <loc>. Pages listed only in the broken file lose that route to discovery.

How Asky checks it

Asky reads each sitemap it uses during its daily site discovery and at the start of each technical audit. It is critical when the body has none of <?xml, <urlset or <sitemapindex in any case and is not a plain list of full URLs, one per line. A .gz file is unpacked first. It is a warning when some <url> entries have no <loc>. Well-formedness, escaping, encoding and the schema are not validated. A blank body is reported as an empty sitemap, and a bot-protection challenge page is skipped.

Reported as a critical issue with high severity when the file is not a sitemap, and as a warning with medium severity for entries without <loc>.

How to fix it

  1. Open the sitemap URL from the issue’s details and view the source. It should begin with <?xml and a <urlset> or <sitemapindex> element.
  2. If you see a web page, such as your homepage, a 404 template or a login screen, the URL is wrong or the sitemap is switched off. Turn it on in your CMS or SEO plugin, or point robots.txt and Asky at the real sitemap URL.
  3. If you use a plain-text sitemap, check every line is one full URL starting with http:// or https://. A single heading, comment or partial address makes the whole file invalid.
  4. For entries without <loc>, fix the generator so every <url> has exactly one <loc> with a full URL, and drop empty entries. Write & in URLs as &amp;.

Example

A <url> entry on https://example.com/sitemap.xml that lost its address, and the repaired entry:

<!-- Before --> <url> <lastmod>2026-08-14</lastmod> </url> <!-- After --> <url> <loc>https://example.com/blog/pricing-guide</loc> <lastmod>2026-08-14</lastmod> </url>

← Back to Sitemap

Last updated on