Broken links are no fun for the website’s visitors because they will hurt their user experience. In addition, it will also badly damage the 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.
In this article, you will learn how to easily check and fix broken links in WordPress in two different methods.
Why Links Got Broken?
Broken links are URL links that are not working anymore.
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:
- The page was deleted.
- The domain name changed.
- The server is down.
- The website is no longer exists.
- Misspelling the link.
Whatever the reason may be, the result is still the same and you should regularly monitor and replace the broken links with working ones.
Broken Links Checker
In this method, we will install a WordPress plugin to scan our site for broken links.
First, navigate to ‘plugins -> add new’ and install the Broken Links Checker plugin.
Search for dead links
Once you activated the plugin, it will automatically start looking 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 that need 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.
Under the URL column, you can see the dead destination and under the source column, you can see which page is showing the link.
Fixing 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.
Luckily, we can easily do one of the two options from the plugin’s screen.
To remove the link from the text, hover on top of the URL and click on the ‘unlink’ option.
A message will popup into 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 will disappear from the list.
On the other hand, if you would like to replace the broken link with a working one, simply click on the edit URL option instead.
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.
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 found.
By default, the plugin will automatically check for broken links every 72 hours and will send a report to the admin email address with the result.
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 ‘E-mail notifications’ to fit your needs.
When done, scroll to the bottom of the page and save the changes.
Online Dead Links Checker
I like the idea of using a WordPress plugin to spot dead links because it’s giving us the option to easily fix them from the plugin’s dashboard.
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 were found and on which pages.
The URL column will display the broken destination page and the source link text will have the link to the page where it can be found.
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 once again to verify that all links were fixed successfully.
In this article, we learned how to search and fix broken links in WordPress in two different methods.
Make sure to read our how to create 301 redirects in WordPress tutorial to prevent that from happening in the future.
Leave us a comment below and let us know which is your preferred method out of the two.