Ran into broken or dead links on your WordPress website? They can certainly ruin the user experience. And not only that. Dead links fare terrible with SEO, and if left in that state, can severely hurt your rankings. For that reason, a solution must be found, and quickly. That’s where we run into trouble, however. If you have hundreds of pages online, and only some are dead, how do you identify them? Also, what could cause all of the links to break suddenly, how long do you have, and how do you even do it? We’ll cover all of that, and more, as we demonstrate how to find and fix broken links in WordPress.
What is a broken link?
As mentioned, a broken link is a dead link or one that’s no longer working. The most obvious consequence of broken links is when pages or WordPress posts start returning the 404 error.
What causes broken links in WordPress?
Now that you know the symptom, here are a few reasons for broken links in WordPress:
- Making a typo when creating internal links.
- Linking to a post that was deleted or whose permalink was changed in the meantime.
- Permalinks are broken, often due to permalink structure change without redirection.
- Moving to a new domain without proper redirection.
- Someone in your comments left a dead link. That’s why you should disable WordPress comments or approve them manually.
How much time do I have to get broken links resolved?
It depends on whether your website was crawled and cached. If it was, Google will continue to show the page from cache for a while, in hopes you’ll solve the problem. If the post or page was never crawled, such as when it was deleted, but the links to it weren’t removed, you should act immediately. And while you can search for dead links manually, that would only waste your precious time. So, the first 6 methods are dedicated to finding them.
1. Use a WordPress plugin to find broken links
This is the easiest method for many because it only requires you to access WordPress Admin Section and install a WordPress plugin. However, doing this can eat away at your server resources and significantly slow down your website. So, you should only enable the plugin until you get the issue fixed. Then, either deactivate it or delete it afterward. We’ll demonstrate one we had a good experience with:
- Install Broken Link Checker for WordPress.
- Expand the main WordPress sidebar on the left.
- Select the new option titled Broken Links that appeared under Tools.
- After the scan is complete, permalinks will be sorted into categories such as Broken, Warnings, Redirects, and Dismissed.
- For the reasons we mentioned, don’t use the plugin’s built-in redirect tool.
2. Identifying broken links in WordPress via Google Search Console
This is the second free option – a tool Google offers to webmasters. Also, after you get the problem fixed, Google Search Console will notify you of new 404 errors immediately. Here’s how to discover dead links using Google Search Console:
- Sign in to the Google Search Console.
- Make sure you confirmed ownership of the website.
- In the left-hand menu, click on Coverage.
- Navigate over to the Excluded and Errors tabs.
- Look for 404 Error/Not found (404) entry and click on them.
- You’ll see a list of dead links, and have an option to download it.
3. Use a cloud-based tool
Once again, there are plenty of options, free and paid. Two of the free ones we like are the W3C Link Checker and Dead Link Checker. Enter your website URL and let it scan.
4. Using SEMRush to discover broken links
Now comes an advanced paid option. You can try it at a very limited capacity for free, and likely get a free trial which is ideal for smaller websites. However, you’ll have to pay for larger websites (100+ pages). Here’s how to utilize SEMRush to identify dead links:
- Create a SEMRush account and log in.
- Click on Site audit in the left-hand menu.
- Click on the New Site Audit button in the top right corner.
- Enter your domain name.
- Tweak settings related to the page number, URL parameters and restrictions, etc.
- Click on the Start Crawling button and let the scan run.
- Click on the Broken link for a detailed report afterward. You can also download a crawl report.
5. Finding broken links in WordPress using Ahrefs
Ahrefs is a powerful paid tool for improving your SEO and offers a 7-day trial for 500 URLs when signing up for an Ahrefs account. Keep in mind, it’s not a free trial, but $7 for 7 days. Here’s how finding broken links with Ahrefs works:
- After you’ve logged in, click on Site Explorer in the top left corner.
- Enter your website URL and click on the magnifying glass icon.
- After the scan is over, click on Pages > Sort by links.
- From the sorting options, select 404 not found.
- Look at links and, if you want, download the report in the CSV format.
6. Download and use Screaming Frog Crawler
Using Screaming Frog Crawler has three benefits. It doesn’t affect your website because it’s the software you can download and install. It can crawl up to 500 pages for free, which is much better than what SEMRush or Ahrefs offers. Finally, as evident from their video demonstration, all it takes is to enter your website URL and click on the Start button.
7. Guide to fix broken links in WordPress
After 6 different ways of identifying broken links in WordPress, it’s time for resolution. The primary way to do that is to add a 301 redirect. It not only redirects users to a new link, but it also signifies to search engines that the post or page at that URL was moved to a new address. That way, your SEO doesn’t suffer. There is a built-in way to do that, through .htaccess, but we’ll focus on demonstrating steps using a WordPress plugin to get you by. Expect a complete guide to redirect a page in WordPress shortly, however.
Fixing broken links in WordPress via Redirection
Install and activate Redirection, then follow these steps to resolve broken links in WordPress:
- Log in to your WordPress Admin section if you installed the plugin via FTP.
- In the main WordPress menu on the left, click on Tools, then Redirection.
- Add the old link under the Source URL.
- Don’t touch query parameters unless you changed your permalinks structure and need to setup a site-wide redirect.
- Add the new link under Target URL.
- Click on the Add Redirect button.
- You’ll have to do this for every dead link.
- Clarification: If the dead link leads to a different website or is an affiliate link, you have to find a replacement (the same website or different source) or generate new links. Alternatively, go back to those posts or pages, and remove the internal link.