How to Check and Fix Broken Links in WordPress
January 15. 2020
Nobody likes to click on a link and find only an error page on the other end. You’ve surely experienced this before yourself. You’re reading an article and find a link to something you want to know more about, something that seems very interesting. But when you click on it, all you get is a variation on “Page not found”. It’s frustrating, isn’t it? And it’s equally frustrating for the users and visitors of your own website. But WP experts say that this isn’t your only problem: broken links actually also affect your SEO score. So for the sake of your rankings and your users both, it’s time to learn how to check and fix broken links in WordPress!
What are broken links?
Broken or dead links are links that don’t work. Instead of taking the user to a different page to view relevant content one of two things happens: they lead to an error page on the website or they lead nowhere (in which case the browser will usually display an error page informing the user the link cannot be accessed). So how does this happen? The main causes of broken links are:
- the website you’re linking to is down, no longer exists or has changed URLs without redirecting
- even though the website exists, the content you’re linking to has been deleted or moved without redirection
- there’s a typo or other mistake in the URL so it doesn’t lead to the website or content you wanted to link to
Broken links are common, especially on websites with a longer history. Even if you rely on professional website maintenance for your own website, external links may end up dead due to things that are out of your control. That doesn’t, however, mean that you should leave broken links all over your website. While a few of them won’t make a huge difference, a large number can negatively affect user experience and even SEO rankings. So it’s best to check and fix broken links if you can.
How can you check and fix broken links in WordPress?
The best way to fix broken links is not to have any in the first place. So make sure that you and any other contributors to your website avoid any SEO mistakes by always checking that the links on your WP website pages and posts work before making them public. And remember to redirect any pages that you delete or move so the links to them don’t end up dead. This should help some with internal linking.
But mistakes happen. And you can’t control what happens with any outbound links you add to your website. So what you also need to do is regularly check for broken links and fix them. If you’re imagining yourself painstakingly clicking every link you’ve ever put on your website to see if it works – relax, that’s not what we mean. While you most certainly can manually check if your links are broken, this isn’t a sustainable strategy for any website that has more than a few dozen pages of content. Luckily, there are much better ways to deal with this problem.
Check and fix broken links in WordPress with SEMRush
SEMRush is a premium web-based SEO audit tool. It’s a good way to check the overall health of your website, including broken links. The one downside is that the free version has a 100-page limit.
You can use SEMRush to find broken links by doing a site audit. First, you will need to log in and select “Site Audit” from the menu on the left. Then, you will need to click on the “New Site Audit” button in the upper right corner, enter your website’s URL and configure a few settings before starting the audit. The audit can take a couple of minutes, but once complete, it’ll give a good overview of any issues. Click on the “Broken” link in the stats and you’ll see all the broken links that popped up during the audit!
Check and fix broken links in WordPress with Ahrefs
Similar to SEMRush, Ahrefs is another premium web-based SEO audit tool. It also works in a similar way: you can perform an overall audit under “Site Audit” and find the list of 404 errors in the report section or you can crawl the website with “Site Explorer” and filter by 404 status under Pages>Best by Links.
Check and fix broken links in WordPress with Google Search Console
Unlike SEMRush ad Ahrefs, the Google Search Console is a free tool designed to help you monitor and manage your website by analyzing its presence in Google search results. You can do a lot with Google Search Console, including fixing server and security issues, mining keyword data, and improving internal linking. But the thing we’re focusing on today is finding and fixing broken links.
All you have to do is log in and navigate to the “Coverage” tab. Under Error and Excluded, you will find a section called “Not Found (404).”. There, you can see all the dead links on your website.
Check and fix broken links in WordPress with Broken Link Checker
If you prefer to check and fix broken links in WordPress itself, you can also use a plugin. Broken Link Checker is your best option here. It will check for any broken links in your posts, pages, and even comments, notifying you when it finds any. All you need to do is install and activate it. To set it up, go to Settings>Link Checker on your WP dashboard. By default, Broken Link Checker checks HTML links, images and YouTube videos every 72 hours. You are, of course, welcome to change any settings you like. You’ll find all the broken links that pop up under the “General” tab.
Fixing broken links: remove or redirect
No matter how pretty you make your custom 404 page, your users don’t really want to see it. So it’s best to fix any broken links you find. You have two options for that: remove the links altogether or redirect them. Simply navigate to the page with the broken link and remove it or put another link in its place. This will work for both internal and external links. However, you can also make your life easier by automatically redirecting internal links with a redirection plugin. If you changed URLs en masse recently, this can be a life-saver as it will redirect all uses of the broken link on all pages.
Why should you check for broken links and fix them regularly?
While it is normal and expected to have a handful of broken links on a large and old website, you should absolutely still regularly check and fix broken links in WordPress. The main reason for this is user experience. You want your users to be happy and revisit your website, don’t you? Well, they won’t if all your links lead nowhere. But aside from that, too many dead links will negatively impact your SEO rankings. Ultimately, it is for the best that you have no broken links so checking for them regularly is a smart strategy.