404 pages and broken links: what to do about them

A visitor clicks a link from search, an old social post, or an email and sees an empty error page. Most of the time they simply close the tab. The site loses people who were already interested and came on their own.

Almost any site that has been around for more than a couple of months has broken links. Below is where they come from, how to find them, and what to show a person when the page really is gone.

Where broken links come from

  • A page was renamed or its address changed during an update
  • A product, service, or old news item was deleted
  • A typo slipped into an address pasted by hand
  • An external site you linked to closed or moved
  • The site moved to a new platform and the address structure changed

The last case hurts the most, and it is covered in detail in the post on moving to a new site.

How to find them

There are three simple sources. First, the webmaster panels of search engines show addresses the crawler tried to open and got an error. Second, programs and online tools crawl your site like a robot and list links that lead nowhere. Third, analytics: if views of the 404 page are tracked, you can see which addresses people arrive at and where from.

Run a check after every noticeable update and now and then for no reason at all.

A redirect or an honest error

If the page has a new address or a close replacement, set up a permanent redirect, also called a 301. People and crawlers land on the right page straight away, and the value built up by the old address passes to the new one.

Sending everything to the home page is a bad idea. Someone looked for a specific product and landed on a general page with no idea what happened. Search engines often treat such redirects as errors too. If there is no replacement, an honest 404 page is better.

What a 404 page needs

A good error page keeps the person from leaving:

  • A short, human explanation that the page is not there
  • The same design as the rest of the site, with the menu and header, so it is clear the site works
  • A few ways forward: home, catalog, popular sections, search
  • A way to get in touch if they did not find what they were after

Technically, the page must return a 404 status code, not a normal success response. Otherwise a search engine may index lots of empty pages.

How not to create new ones

Before deleting or renaming a page, decide where its address will point. Keep a simple list of redirects and check it after updates. Links inside texts are better added with the site's own tools than by copying addresses by hand.

Checking links is also part of accepting a site before launch.

Finding broken links, redirects, and technical cleanup are part of speed and SEO. If you want your site checked, get in touch.