- Joined
- Oct 22, 2018
- Messages
- 231
- Solutions
- 11
- Reaction score
- 247
The "Broken backlinks" report in Ahrefs returns some false positives and misses some broken backlinks altogether.
To get around this, I use a combo of Ahrefs and Screaming Frog (SF) to find broken backlinks.
Next:
In the spreadsheet:
To get around this, I use a combo of Ahrefs and Screaming Frog (SF) to find broken backlinks.
tl;dr
- Export all backlinks from Ahrefs.
- Run the destination URLs through Screaming Frog using "List Mode". Check for:
- No Response
- 404s
- 5XX errors
- Redirect loops
- Redirect chains longer than 5 hops
Detailed Steps
- Go to Ahrefs, plop the URL into the search bar of Site Explorer and click on "Backlinks" in the left-hand sidebar.
- Important: make sure that "All backlinks" is selected from this drop-down:
Next:
- Click "Export".
- Make sure to change the "Number of rows" to "All". Click Export and open the spreadsheet.
In the spreadsheet:
- Copy the URLs from the "Target URL" column. Pro Tip: to make the crawling process faster, de-dupe the list. Assuming your site's redirects are properly set up (so that the http/https and www/non-www variations all send the user to the canonical version), do a find/replace in the spreadsheet so that all URLs start with the same "http" or "https" and with or without "www." Then remove duplicates (here's how in Excel).
- After duplicate URLs have been removed, take the resulting list of URLs and run them through Screaming Frog in "List" mode.
- Copy the list of URLs.
- In Screaming Frog (SF), select Mode > List from the main menu.
- In SF, click Upload > Paste.
- Click OK
- Click "Response Codes" tab.
- In the "Overview" tab on the right (see screenshot above), click on the following:
- No Response
- If there's a short list of URLs, check them manually (make sure it's not a false positive) because sometimes the website doesn't handle SF well.
- If there's a longer list, click "Export" and re-crawl them in List Mode at the end of this process.
- Server Error (5xx)
- If there's a short list of URLs, check them manually (make sure it's not a false positive) because sometimes the website doesn't handle SF well.
- If there's a longer list, click "Export" and re-crawl them in List Mode at the end of this process.
- Client Error (4xx)
- Export this list.
- Make sure to remove any 403 errors (or manually check them), because those are typically websites just blocking SF from crawling the site.
- No Response
- Combine the lists of actual broken links into one spreadsheet.
- For each URL, figure out the destination URL for where the broken link should redirect to. Ideally, this won't be the homepage. Why? Google considers a redirect to the homepage to essentially be a 404 (soft 404), which won't help with passing link juice.
- Upload redirects to the website.
- Back in Screaming Frog, click Reports > Redirects > All Redirects.
- Open the exported spreadsheet.
- Check for redirect loops("Loop" column)
- If there are any, those will need to be addressed by looking into existing redirects (ex. in the site's Redirection plugin). Fixing these loops will fix the broken link.
- Check for too many redirect hops.
- Look at the "Number of Redirects" column. If there are more than 5, fix the redirects so that there's not more than 5 hops in the redirect chain. Why? Google says, "While Googlebot and browsers can follow a 'chain' of multiple redirects (for example, Page 1 > Page 2 > Page 3), we advise redirecting to the final destination. If this is not possible, keep the number of redirects in the chain low, ideally no more than 3 and fewer than 5. Chaining redirects adds latency for users, and not all browsers support long redirect chains."
- Clear the website's cache (ex. hosting cache, CDN cache, and/or whatever plugin you're using).
- Recrawl the list of URLs in Screaming Frog to see if they properly resolve. If they don't, troubleshoot from there.