How To Create a Custom 404 Error Page on WordPress
The reason you are here reading this article could be that you recently checked crawl errors inside your Google webmaster console.
There you may have seen multiple pages with 404 error type.
No worry! No need to get into the technical part to fix this error on your site. But first you need to know what is 404 error and why is it showing on your site.
What is 404 error page?
404 is an HTTP error code that shows that the requested page is not found or not available or has been removed. It is one of those errors that are usually out of the control of website owners.
But luckily, you can customize your website’s 404 error page to control how it looks.
Most online visitors will close a website as soon as they encounter a normal 404 error page. A large number of 404 errors can also increase your site's bounce rate.
The 404 error page simply indicates that the requested item or information is not available on this website.
By setting up a custom 404 error page, you can tell your website visitors to take alternative actions in case a particular page of the website has stopped working for some reason.
By default, WordPress shows a default 404 page that looks something like the image below.
As you can see, it doesn’t say much in terms of what users are supposed to do next, except the search option, which is definitely a plus point.
But you can customize this page to add much more than the search option. You can make it more smart and optimized for your visitors.
How to Create a Smartly Optimized Custom 404 Error Page in WordPress?
There are basically two methods for creating and implementing a custom 404 error page on your WordPress website
- Using .htaccess file.
- Using a WordPress plugin.
The first method is a good choice only if you are a professional coder. .htaccess is one of the core files of your WordPress website that should not be messed up with if you do not have good knowledge of it.
Luckily, we have an easier and even better method for creating a custom 404 page in WordPress.
Using 404 page WordPress Plugin to Create a Smart Custom Error Page
The 404 page plugin is the most widely used plugin for setting up a custom 404 page on any WordPress website. You can create a 404 error page in any style, with any image and text you want to display on the page.
The 404 page plugin integrates well with all the popular WordPress themes and plugins, allowing you to use their full power for developing the best custom error page for your website.
In this article, we will discuss the step-by-step process for installing and using the 404 page plugin to create an awesome smart 404 error page in WordPress.
Let’s first discuss some basic points and requirements about this method.
- To use the 404page plugin, you need to set your website’s Permalink Structure (Settings -> Permalinks) to anything but plain (default) option.
- There is no automatic redirection for 404 errors in this plugin. The page you create and select will automatically appear as the default 404 error page.
- Further styling (custom CSS) can be added using the 404page plugin’s CSS class error404.
Follow the steps below to get started.
To download the 404page plugin, visit your WordPress website’s dashboard and click on Plugins -> Add New.
Search for “404page” using the search box at the top.
Click on ‘Install Now’ button for the plugin with title “404page – your smart custom 404 error page”. See the image below for reference.
Now, activate the plugin. Once the plugin is activated, you can see the option 404 Error Page under the Appearance menu.
Step 2: Creating a 404 Error Page
In order to create a 404 custom error page for your website.
Create a new page with the title “404 Error Page.” You can edit this page just like any other page on your website.
Now add custom 404 image, text, instructions, search box, etc. and save your new page.
See the image below for an example of a custom optimized 404 page.
Step 3: Setting up the 404 Error Page
Once you are done creating the page, you need to select this as your website’s default 404 page. Follow the steps below to do this.
Go to Appearance -> 404 Error Page section of the WP dashboard.
Let’s discuss each option one by one.
Page to be displayed as 404 page: Select the page (404 Custom Page) that you want to be displayed as the default 404 page on your website. Select the page we created using above step 2.
Hide 404 page: This option lets you hide the custom 404 page from the list of pages for non-admin users.
Fire 404 error: By selecting this option, you can guide WordPress to show 404 error, if and when the custom 404 page is ever accessed directly by its URL.
Operating Method: There are two operating modes here, Standard Mode and Compatibility Mode. Read the instructions properly to select a default mode for your custom page.
Click the ‘Save Changes’ button at the bottom to save the setting options.
Edit Page button: The ‘Edit Page’ button allows you to directly access and edit your custom 404 page from here.
Test 404 error: This button allows you to test the 404 error page after the settings are updated.
This should do the job.
Now, all your website’s 404 error requests will automatically open in the new custom smart 404 error page. You can edit this page to make it more attractive and useful.
I hope this guide will help you to create your custom 404 error page. If you are done designing your unique 404 page. You can share your thoughts via the comments section below.
Don't forget to share this article with your social networks.