How to Set Up a Custom 404 Error Page
A custom 404 error page is a strong enhancement to any business website. By providing useful information to visitors when they land on a missing page, you turn a frustrating and confusing experience into one that can actually improve their impression of your brand and set the stage for a conversion. Here are step-by-step technical instructions for setting up a custom 404 page for various platforms.
1. Drupal Website
- Create your 404 page within the Drupal CMS. This can be as simple as creating a Basic Page and adding some custom text and links on that page.
- In the Drupal admin section, navigate to Configuration > Site Information.
- Under the “Error Pages” section, update the path field to point to your custom 404 page.
2. WordPress Website
- By default, WordPress will look for a file named 404.php in your theme. Every WordPress theme should have a 404.php file in it, but it might not be a custom page.
- You can customize this file or create a brand new file named 404.php and upload it to your theme in place of the current one. If for some reason your site does not have a 404.php file, you can create one as a simple HTML file with a .php extension and then upload it to your site’s theme directory.
- Any time a 404 error occurs, WordPress will serve up this 404.php page to the user.
3. Custom / Static Website - Apache Server
- Create your 404 page as an HTML file. The name of the file is not important, but for this example, let’s say you’ve named it 404page.html.
- Upload that file to your website’s root directory.
- Add this line into your. htaccess file: ErrorDocument 404 /404page.html.
Suggestions for 404 Page Content
- Friendly text explaining the error. It’s common to put something witty or funny here to let the user know that what he or she is seeing is normal and not to worry. This is also good from a usability perspective and helps reduce user frustration.
- Helpful links to common pages of the website, including the home page, contact page and site map page.
- A site search box.
- Phone number and address.
- A design different from your website, which alerts users that they are not on a standard page.
The Best 404 Pages Are Seldom Seen!
A well-designed 404 page is definitely a marketing asset, but it works best of all when it is viewed infrequently.
To that end, make sure internal website links are tested regularly so that broken links can be identified and repaired. In addition, review inbound links regularly to spot outdated links, and then send a request to the publisher to update the link to target a current page.