Hreflang to Non-200 URLs
URLs in hreflang tags which return a non-200 status code.
Priority: Medium
Impact: Negative
What issues it may causeโ
An hreflang where the target URL does not return a 200 status will be ignored by search engines.
The URLs are likely to be crawled by search engines in the process of validating the hreflangs resulting in some wasted crawl budget.
How do you fix itโ
Update the hreflang target so it's pointing to the relevant page with a 200 response code.
What is the positive impactโ
Search engines may show the alternate language page in search results for users where appropriate.
Crawl budget can be saved so other pages may be crawled more frequently, or save on server costs.
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 GetReportForCrawl($crawlId: ObjectID!, $reportTemplateCode: String!) {
getCrawl(id: $crawlId) {
reportsByCode(
input: {
reportTypeCodes: Basic
reportTemplateCodes: [$reportTemplateCode]
}
) {
rows {
nodes {
... on CrawlLinks {
urlTo
urlToTitle
relUrlFrom
urlFrom
urlFromTitle
urlToStatusCode
urlToDeeprank
urlFromDeeprank
hreflang
linkType
attrRel
}
}
}
}
}
}
{"crawlId":"TjAwNUNyYXdsNDAwMA","reportTemplateCode":"hreflang_link_non_200"}
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 GetReportForCrawl($crawlId: ObjectID!, $reportTemplateCode: String!) { getCrawl(id: $crawlId) { reportsByCode( input: { reportTypeCodes: Basic reportTemplateCodes: [$reportTemplateCode] } ) { rows { nodes { ... on CrawlLinks { urlTo urlToTitle relUrlFrom urlFrom urlFromTitle urlToStatusCode urlToDeeprank urlFromDeeprank hreflang linkType attrRel } } } } } }","variables":{"crawlId":"TjAwNUNyYXdsNDAwMA","reportTemplateCode":"hreflang_link_non_200"}}' https://api.lumar.io/graphql