Sitemap has valid XML
highsitemap_valid_xml
Checks that the sitemap has valid XML syntax.
What does this rule check?
The sitemap must be well-formed XML that conforms to the sitemap protocol specification. Invalid XML prevents search engines from reading the sitemap entirely.
Why is this important?
If the XML is malformed, search engines cannot parse the sitemap and will ignore it completely, negating all the benefits of having one.
How to fix
Validate your sitemap XML. Ensure proper encoding, no invalid characters, and correct namespace declarations.
Examples
Incorrect
<urlset>
<url><loc>https://example.com/</loc>
<!-- Missing closing tags! -->
Correct
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://example.com/</loc></url>
</urlset>
Agent fix snippet
Copy this snippet and paste it into your AI coding agent to fix this issue automatically.
Validate sitemap XML:
1. Check XML declaration is present
2. Verify the sitemap namespace
3. Ensure all tags are properly closed
4. Use a validator tool to check for errors