Empty Sitemaps
Sitemaps which return a 200 status code but don't contain any valid URLs
Priority: Medium
Impact: Negative
What issues it may cause
Sitemaps should contain some valid URLs so it's likely that the sitemap generation process is failing.
There may be legitimate instances of empty Sitemaps, such as News Sitemaps which may be filtered on publish dates and where no recent content has been published.
How do you fix it
The sitemap generation process should be checked to understand if it has failed. The sitemaps should either be fixed, or removed so they return a 404 status.
If the Sitemaps appear to contain URLs, check they are absolute URLs as relative URLs in Sitemap are not valid and they must be fully qualified.
What is the positive impact
Fixing a broken an empty Sitemap so it includes the expected content will help new pages to be discovered.
Removing a redundant Sitemap by returning a 404 status may improve the crawling efficiency of other Sitemaps.
How to fetch the data for this report template
You will need to run a crawl for report template to generate report. When report has been generated and you have crawl id you can fetch data for the report using the following query:
- Query
- Variables
- cURL
query GetReportStatForCrawl(
$crawlId: ObjectID!
$reportTemplateCode: String!
$after: String
) {
getReportStat(
input: {crawlId: $crawlId, reportTemplateCode: $reportTemplateCode}
) {
crawlSitemaps(after: $after, reportType: Basic) {
nodes {
url
sitemapType
httpStatusCode
urlCount
restrictedReason
}
totalCount
pageInfo {
endCursor
hasNextPage
}
}
}
}
{"crawlId":"TjAwNUNyYXdsNDAwMA","reportTemplateCode":"empty_sitemaps"}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"query GetReportStatForCrawl( $crawlId: ObjectID! $reportTemplateCode: String! $after: String ) { getReportStat( input: {crawlId: $crawlId, reportTemplateCode: $reportTemplateCode} ) { crawlSitemaps(after: $after, reportType: Basic) { nodes { url sitemapType httpStatusCode urlCount restrictedReason } totalCount pageInfo { endCursor hasNextPage } } } }","variables":{"crawlId":"TjAwNUNyYXdsNDAwMA","reportTemplateCode":"empty_sitemaps"}}' https://api.lumar.io/graphql