SEO finding
The XML sitemap is missing, unreadable, too large or not announced in robots.txt
SEO Warning Severity: Medium
Part of the audit XML sitemaps. Finding id: seo.sitemapFile.
What it costs you
The sitemap is how you tell search engines which pages exist and when they changed. Without a readable one, new and deep pages are found later.
What to do
Serve a valid XML sitemap with status 200, split it when it passes the limits, and name it in robots.txt.
What it checks
- Sitemap not found
- Sitemap not named in robots.txt
- Sitemap has format errors
- Sitemap too large
How to fix it
Repair the XML
- Open [sitemap url] in a browser: the XML error is shown with its line number.
- Escape the characters XML reserves in URLs: & becomes &.
- If the file is generated, fix the generator so it escapes every value.
How to check: Open [sitemap url] in a browser: it shows as XML without an error. Run this rule again.
Split the sitemap
- Write at most [max entries] URLs and [max bytes] bytes to each part.
- Name the index, not the parts, in robots.txt.
How to check: Run this rule again: no file is over the limits.
Publish a sitemap and name it in robots.txt
- Let the CMS or the build generate the sitemap; do not maintain it by hand.
- Use the full address in the Sitemap line, with protocol and your own host name.
How to check: curl -sI on the sitemap address returns 200 with an XML content type, and /robots.txt shows the Sitemap line.
Thresholds
| Name | Default | Meaning |
|---|---|---|
max_entries | 50000 | Most URLs one sitemap file may list. The default is the limit of the sitemap protocol; lower it only to split earlier. |
max_bytes | 52428800 | Largest sitemap file in bytes, uncompressed. The default is the 50 MB limit of the sitemap protocol. |