All Broken Redirects
URLs which return a redirect to a URL with a 4xx/5xx HTTP status code.
Priority: Critical
Impact: Negative
What issues it may cause
These redirects will result in a poor user experience, waste crawl budget and they will be unable to pass on any PageRank from backlinks to other pages on the site.
How do you fix it
The redirect target URL should be updated to a relevant alternative page which responds with a 200 status.
What is the positive impact
- Traffic to the redirecting URL is less likely to exit, helping to increase conversions.
Any PageRank from backlinks on external sites can be passed on to the redirect target, helping to improve the rankings of the redirect target and other pages.
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 CrawlUrls {
url
redirectChain
redirectedToUrl
foundAtUrl
foundAtSitemap
deeprank
level
httpStatusCode
redirectedToStatusCode
redirectCount
foundInGoogleAnalytics
foundInGoogleSearchConsole
foundInBacklinks
foundInList
foundInLogSummary
foundInWebCrawl
foundInSitemap
}
}
}
}
}
}
{"crawlId":"TjAwNUNyYXdsNDAwMA","reportTemplateCode":"all_broken_redirects"}
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 CrawlUrls { url redirectChain redirectedToUrl foundAtUrl foundAtSitemap deeprank level httpStatusCode redirectedToStatusCode redirectCount foundInGoogleAnalytics foundInGoogleSearchConsole foundInBacklinks foundInList foundInLogSummary foundInWebCrawl foundInSitemap } } } } } }","variables":{"crawlId":"TjAwNUNyYXdsNDAwMA","reportTemplateCode":"all_broken_redirects"}}' https://api.lumar.io/graphql