Unique Broken Links
All instances of links with unique anchor text and target URL, where the target URL returns a broken status code (400, 404, 410, 500, or 501).
Priority: Critical
Impact: Negative
What issues it may cause
Broken links can result in a bad experience for users if they click the link and arrive at the broken page, resulting in poorer engagement and potential loss of conversions.
Search engines may waste crawl budget to crawl the broken page or check if the page has been fixed, which could be better used on other pages.
How do you fix it
If there are broken pages that are found in the web crawl (linked from a page discovered by following links from the starting URLs) then the links should be removed or updated to point to a URL which returns a working page.
What is the positive impact
Visitors will have a better user-experience and a potentially lower rate of bounce back to search results if they do not experience any broken pages during their visit, which may positively impact the rankings and increase traffic.
Crawl budget spent crawling the broken pages may be reduced, allowing crawl budget to be used on more important pages, 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 GetReportStatForCrawl(
$crawlId: ObjectID!
$reportTemplateCode: String!
$after: String
) {
getReportStat(
input: {crawlId: $crawlId, reportTemplateCode: $reportTemplateCode}
) {
crawlUniqueLinks(after: $after, reportType: Basic) {
nodes {
anchorText
urlTo
urlToTitle
primaryUrlFrom
primaryUrlFromTitle
instanceCount
primaryUrlFromDeeprank
urlToDeeprank
urlToStatusCode
urlToDeeprank
primaryUrlFromStatusCode
primaryUrlFromDeeprank
}
totalCount
pageInfo {
endCursor
hasNextPage
}
}
}
}
{"crawlId":"TjAwNUNyYXdsNDAwMA","reportTemplateCode":"unique_broken_links"}
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} ) { crawlUniqueLinks(after: $after, reportType: Basic) { nodes { anchorText urlTo urlToTitle primaryUrlFrom primaryUrlFromTitle instanceCount primaryUrlFromDeeprank urlToDeeprank urlToStatusCode urlToDeeprank primaryUrlFromStatusCode primaryUrlFromDeeprank } totalCount pageInfo { endCursor hasNextPage } } } }","variables":{"crawlId":"TjAwNUNyYXdsNDAwMA","reportTemplateCode":"unique_broken_links"}}' https://api.lumar.io/graphql