Managing 404 server error response pages

How to handle 404 errors

Well managed 404 "file not found" errors can turn potential problems into great opportunities that help you get the most from Web traffic that might otherwise slip between the cracks.

Even if visitors are trying to find content that no longer exists, a good 404 error page can direct them to the information they are after and lead to a conversion - just like any other good landing page.

Makes sense right? Just because a visitor is after a non-existent page (perhaps they have been directed to a mistyped URL from another site) doesn't mean we can't try give them what they're after anyway.

This article looks at how to implement and improve on standard 404 error pages for business websites.

404s & server response codes

It's important to note that a 404 page also requires a 404 server response that tells browsers and search engines that page does not exist.

Without the correct server response, googlebot will most likely go about indexing non-existent pages and this can lead to some serious indexing issues - and potentially a penalty down the line.

A good way to check whether your server responses are configured correctly is to use the Fetch as Google tool in Google Search Console. Simply add the relative URL in the space provided and click Fetch. this will bring up a page that looks like this:

Fetch as google showing correct responses

As you can see the top result shows an error (because that particular page no longer exists on the server), and clicking on this link brings up the result as seen by Google (note the server response code right at the top):

404 server response as seen by googlebot

This is exactly as we want it because we can be sure that Google won't get confused and add this URL to the index. For completeness, looking at a page that does exist on the site, gives the expected 200 (OK) response:

200 OK server response as seen by googlebot

Getting server responses working correctly is absolutely vital from a search optimization perspective - especially if organic traffic from Google is an important part of your online revenue stream.

But what do human visitors actually see when the server responds with a 404 code? This is where applying a bit of strategy can have tremendous benefits...

Helpful 404s

Most companies tend to provide a standard Page not found notice and leave it at that.

Ok, so technically that's accurate. The page doesn't exist, and that's what the visitor is told. But leaving it at that is inviting the visitor to go to a competing site to find what they're after. That's definitely not what you want.

This leads some companies to add a bit of helpful, generic information about the most important parts of their site - in the hope that the visitor will click on a link and continue browsing around.

404 pages can be made like any other web page, and most decent hosting package make it quite easy to specify which page the server should respond with along with the 404 server response - traditionally, it's something like 404.shtml.

Here's a good example of a generic 404 page:

Generic 404 page

There are a few features to make note of:

  • File not found header: Make it immediately clear that this is not the page that was originally requested
  • Tagline: Let people know what the site is about in one line
  • Snippets: Link to the most popular and useful pages on the site

This particular page also has a Google ad embedded in it, which is not really helpful or useful, so that is definitely something that could be reconsidered.

Finally, this page might look a bit plain to you, but there's a good reason it is missing the sidebars with all the informational blocks and associated content that goes with a standard page - performance.

Without knowing precisely what a user is after, there is little point in incurring performance costs or slowing things down by including rich media and other content. It's generally a good idea to keep things light, simple, and fast so that users can make their own decision about where to go (based on the information you have provided).

But can we do better than this?

Advanced 404s

A very common cause of 404 error pages is careless copy and pastes from other webmasters - often a link pointing to your site may have only a few characters chopped off the end. By looking at the URL that a visitor tried to visit, it is often possible to get a good idea about the type of information they may be after.

This means that you could perform a site search based on any meaningful keywords present in the URL and return the results as a part of the 404 error page. SME Pals does this. Here's a screenshot of a 404 page in which the last few characters of the URL for a marketing strategy article was purposefully chopped off:

Dynamic 404 page using site search results

Note the fact that the first result is likely to be a page that is of interest to the visitor because it is closely related to what they were after in the first place (if not the precise page they wanted).

Having a dynamic 404 page that offers highly relevant information based on what the user wants is a huge improvement over static, generic 404 pages. We've essentially taken a server error and turned it into an opportunity to meet the needs of a visitor, and this will drastically improve the chances of making conversions.

What do you think of this strategy? What other strategies have you seen for serving 404 pages that would help a business to engage and meet the needs of their visitors better?

Share your tips in the comments.

Old HTML tables can be upgraded into a responsive design with CSS3 and media queries

Mobile first, responsive Web design is something that can't be ignored because devices likes tablets and smartphones are quickly becoming the dominant browsing device of choice for the burgeoning millennial market.

If you are one of those unlucky people to have built your site more than a few years ago, on a platform that used the old table based Web design paradigm, then you have two choices: