Broken links will hurt the user experience and damage your ranking in search engines.
Finding and fixing broken links should be a top priority for every website and must be done as soon as possible.
This article will learn how to quickly check and fix broken links in WordPress in two different methods.
Why You Have Broken Links
You may wonder why you have broken links on your website although you never created them.
Usually, when clicking on a broken link, the destination page displays a 404 error page or ‘this site can’t be reached’ message.
There are many reasons for links to stop working and become broken, but here are the most common ones:
- You deleted the page.
- The domain name changed.
- The server is down.
- The website is no longer exists.
- Misspelling the link.
Whatever the reason, the result is still the same, and you should regularly monitor and replace the broken links with working ones.
Fix Broken Links in WordPress
This article will show you two ways to find and fix the broken links of your website.
The first way will be by using a plugin, and the second way is by using an online tool.
Start with the first way, by using the broken links checker plugin.
Method #1: Use a Plugin
We will install a WordPress plugin to scan our site for broken links in this method. This is an easy method and therefore, I recommend you to use it.
First, navigate to Plugins -> Add New and install the Broken Links Checker plugin.
Once activated, move one and search for broken links.
Search for dead links
Once you activate the plugin, it will automatically look for broken links on your website. Head over to settings -> links checker to view the scanning progress.
In our example, the plugin found two broken links to be fixed.
Click on the status link or head over to the tools -> broken links screen to see which and where the broken links are.
Then, under the URL column, you can see the dead destination, and under the source column, you can see which page is showing the link.
Now that we know which links need our attention, we can move on and fix them.
Fix the links
After finding the broken links, you can fix them in two different ways.
The first option is to unlink the linked text, and the second option is to update the broken link with a working one.
Changing the link destination to a working page will help your SEO, and therefore I recommend you to do it.
Luckily, we can easily do one of the two options from the plugin’s screen.
To remove the link from the text, first hover on the URL and click on the unlink option.
Then, a message will pop up on the screen asking you, ‘Are you sure you want to unlink and remove this link from all posts?’, click ok.
Approving the action will remove the dead link from the page and disappear from the list.
On the other hand, click on the edit URL option instead if you would like to replace the broken link with a working one.
Then, enter a working link inside the URL field and click update.
Once updated, refresh the page, and you won’t find the broken link under the broken tab any longer.
You successfully fixed the dead links of your website. However, it would be best if you didn’t stop here. Move on to the next step to automate the process.
Regulate the checker
Using the checker plugin is a good idea because we can decide how frequently to check for dead links and whether to be notified if any are found.
The plugin will automatically check for broken links every 72 hours and send a report to the admin email address.
If you would like to modify the default settings, navigate back to ‘settings -> link checker’ and change the options of the ‘check each link’ and ‘Email notifEmailns’ to fit your needs.
When done, scroll to the bottom of the page and save the changes.
Ensure to read our how-to create 301 redirects in the WordPress tutorial to prevent that from happening in the future.
Method #2: Online Dead Links Checker
I like the idea of using a WordPress plugin to spot dead links because it gives us the option to fix them from the plugin’s dashboard quickly.
For some of you who don’t want to use a plugin, you can also use an online tool to check for broken links.
Open the online checker website and enter your website URL. Choose if to check the entire website or the entered address only.
The online checker will start crawling your site, scanning for broken links.
The results screen will show you how many broken links there are and which pages.
The URL column will display the broken destination page, and the source link text will have the link to the page where you can find it.
Click on the link to be taken to the page and fix it from within the WordPress Gutenberg editor.
After fixing the links, scan the website again and verify that you successfully set all links.
In this article, you learned two ways to find and fix broken links in your WordPress website.
Leave us a comment and know which method you used to achieve this task.