We’ve all stumbled across a webpage that no longer works. If you’re lucky, the 404 error page has been customized and at least points you where you might want to go. If you’re unlucky, you just get a 404 error and have to manually find a new way to get where you were trying to go. But what about on your own website? Do you handle these errors in the best way possible? Here we offer tips on how to fix 404 errors on your website.
Step #1: Identify the Errors
First, you need to identify the 404 errors on your site. A client might have reported a broken link or you might have encountered an issue while you were clicking around your site, but the best way to find ALL the broken links on your website (especially if you have a large site that could have hundreds or even thousands of broken links) is to use tools to help you.
We recommend the following tools to find 404 errors:
Google Search Console (formerly Google Webmaster Tools). Log into your account (or set one up if you haven’t already and link it to your Google Analytics account) and click on your property, then click Crawl > Crawl Errors on the left-hand side. There you will see a list of URLs for any pages Google has indexed that result in 404 errors. You can download a spreadsheet of these URLs.
Xenu Link Checker. Don’t be put off by the scary-looking site! We’ve used Xenu for years to check for broken links. You can turn on your virus-checking software before downloading their desktop version (we’ve never had any problems, but better safe than sorry) and then run the tool. You’ll enter the URL of the site you want to check. Be sure to use the canonical URL (e.g. https://www.thoughtprocessinteractive.com is the URL Google has indexed, while https://www.thinktpi.com and https://thoughtprocessinteractive.com simply redirect to that site, so we would use https://www.thoughtprocessinteractive.com in Xenu). Xenu will output a webpage with info about your 404 errors. Xenu doesn’t offer download functionality so it’s somewhat of a manual process to get it into a spreadsheet.
WP Security Audit Log or similar plugin. If you have a WordPress site, we recommend installing a plugin like WP Security Audit Log. This will often find additional 404 errors that the other two link-checking tools don’t catch, especially behind-the-scenes files that don’t usually get accessed by regular users. Grab any results from this tool and add them to your spreadsheet as well.
Step #2: Map the Errors to a New Page
Now that you have a spreadsheet of all the broken links on your site, it’s time to match them up or fix them. This greatly depends on your site and your business, but here are a few tips:
If you’re linking to a page that no longer exists (either on your site or on another site):
- First try to see if that content has simply moved elsewhere. Use the site’s search or Google. If you find the content elsewhere, pop the new link into your spreadsheet.
- If you’re unable to find the content anywhere, try finding similar content on another site. For example, if you were linking to an article with statistics about identify theft, a quick Google search will probably turn up a similar reputable article you can replace yours with. Once you find a good replacement, pop that link in your spreadsheet.
- If you can’t find a single thing on the internet that will work, make a note to simply remove the link from your site.
If you were linking to a page that has moved elsewhere, note the URL of the new page in your spreadsheet. Sometimes there won’t be an exact match but here are some tips:
- In cases where you no longer offer a particular product or service, redirect to the most similar one. If no similar ones exist, redirect to the main product or service page.
- If you can’t find any content that matches, you can redirect to the home page.
In all cases, think of the user. If they were expecting to find X, what is the closest match you can now direct them to? If you can’t find a close match, then you can redirect to the home page or remove the link.
Step #3: Repair or Redirect the Pages
Now that you’ve filled out your spreadsheet, it’s time to make the updates. Here are two ways:
- For broken links, go to the page on your site with the broken link and update it with the correct link in your spreadsheet. Save, test, and repeat for all the links on your site.
- For redirect links, use a plugin like Redirection to map each old URL to the new URL. Save, test, and repeat for the remaining links in your spreadsheet.
The next time you run Xenu, none of those broken links should appear. In Google Search Console, check the “Mark as Fixed” box for each URL that has been corrected so that you don’t continue to see the same URLs each month. (And yes, we do recommend going through this process each month!)
That’s A Lot of Work. Do I Really Need to Fix 404 Errors?
Exhausted? We hear you! Some of our clients have 50+ links to update each month, depending on the size of their site and the frequency with which their products change. Others have 100+ blog posts, many with links offsite that have the potential to go dead anytime.
Without constant monitoring for broken links, your website risks delivering a poor user experience and sending a weak signal to Google about its value. If you don’t have the time or resources to monitor and fix broken links using the steps above, we can help. Contact us to learn how we can help!