We’ve all seen them… those “Page Not Found” error messages that pop up when we click on an interesting link. Unfortunately, those error pages aren’t nearly as interesting as the link we clicked and if we run into too many of them on a given site, we’ll just go looking elsewhere, won’t we?
But you can create customized error pages to ensure that you keep your readers’ interest by successfully directing them to the topics they want to see. And here’s how:
What is a 404 page?
When your readers click on a link that points to a page that doesn’t exist, the search engines redirect those readers to a generic error page, known as a “404 page”.
How do I customize my 404 page?
- First, establish that your webhost can support 404 page customization. Free hosting companies don’t offer this feature however, most paid web hosts do.
- Create and upload a webpage named “404page.html” or whatever you want to name it. Write something fun, relaxed, and informational such as “Ooops! Our fault. Sorry for the inconvenience. You can reach us at www.yourlawfirm.com.” You could also go one step further and include links to your various blog categories, a search bar where your reader can search their topic within your site and perhaps even a list of recently published and/or most popular blog posts. Save the file in the root directory of your website.
- Now, for the tricky part. You need to edit your .htaccess file. This file resides in your root directory, so depending upon your hosting company, you may be able to edit this file by logging into your CPanel admin area. If you host your website on your own server, this file can be open in your notepad program.
- Find the file, open it and add this line: ErrorDocument 404 /404page.html (or whatever you named it).
- Save the file (with the .htaccess extension – not as .txt)
- Upload the file into your root directory (with all of your other web pages)
Test your custom 404 error page
Now test your page. Type a URL that uses your domain name but otherwise doesn’t exist and see what pops up. If you did everything correctly, you should see your new, customized page. As an added tip, take some time to review your links and ensure they still work. The easiest way to prevent potential clients from receiving an error on your website is to make sure your site doesn’t contain old links.