Not having a customized 404 error page leaves cookies on the table. 404 page requests are happening by typing errors, moved pages or deleted content. We show you a way how to handle that and take advantage of the traffic. We provide you with all the codes you need to setup your error page.
Create a custom 404 page and use.htaccess
In your root domain folder is a file called .htaccess. You can edit that with a regular text editor. Enter the following line where "mycustom404.html" is the URL to your customized error page.
ErrorDocument 404 /mycustom404.html
A customized 404 page can be designed however you like and also works as an marketing instrument. A visitor expects a specific content but if the site is not existing the browser tab is closed in miliseconds. Your aim should be to create optional content to help your visitors to keep on browsing on your site. An example would be:
"Oh sorry - the page you were looking for is not here anymore."
here is our most popular content:
- 5 SEO Tips you haven't known
- Why we should not overoptimize our websites
- 3 Reasons to get a custom 404 error page
From a designing point of view make the "oh sorry, page not found" info small and the options visually easy to catch.
You can then continue with a newsletter signup form and offer a free ebook or simply put a huge search box if your site has a search functionality. Put a link to your homepage or present your instagram stream. Be creative and think what`s best to keep the visitor interested.
In general write a friendly excuse and help with the further navigation. Make sure to test your 404 page by typing in a non existing URL: yoursite.com/blabla123.php
Your main goal should still be to NOT have any missing pages and broken links. Our seocheck is scanning for that also.
custom 404 page in WordPress:
Creating a custom 404 page is quite simple. Create a file in your theme (if there isn't already that file) named "404.php". It has to be named case sensitive as WordPress is looking for that filename. You can then edit that 404.php file and customize it to fit your needs. The WordPress Codex has further infos about that: https://codex.wordpress.org/Creating_an_Error_404_Page
If you are using WordPress and to ensure that your server shows the 404.php template you can also add this line of code to your htaccess:
ErrorDocument 404 /index.php?error=404