The 404 error is one of most recognizable errors people can find on the Internet, for following a wrong link, clicking on a dead link, visiting a webpage that has been removed, etc. When visitors see such a message, they are usually inpatient, immediately closing this page and leaving your site without hesitates. In order to hold your visitors and fix your site, we explain what HTTP 404 error is and show you the detailed guidelines to fix it in WordPress websites.
What is HTTP 404 Error?
The 404 error message is an HTTP standard response code, with which website is able to connect with the server. It is typically presented by the server when a link is broken, the link is changed, or just the corresponding page has been removed or deleted.
In general, the standard 404 error page is a white screen with simple information that tells you the request is unreachable. Here is a screenshot of the basic 404 page.
However, many webmasters choose to customize 404 pages to beautify the page look and increase the user-friendliness. No matter what the page is, you can find some common words, such as
- “404 Error”
- “404 Not Found”
- “The requested URL [URL link ] was not found on this server.”
- “HTTP 404 Not Found”
- “404 Page Not Found”
When you see some similar content on a webpage, you meet a 404 error and just try to do something others.
Causes for 404 Error and Ways to Fix It
The 2 main issues are,
Issues on Your Permalink Structure
If the permalink structure of your WordPress site has been changed, your internal pages will be moved to new URLs. When this happens, any link that points to the old URLs will be broken, and here will appear 404 page error on your website.
Resolutions: Resave Your Permalinks Settings
You should go to your WordPress Dashboard to fix the permalinks setting. In specific, hang the pointer on “Settings” to expand it, and then click “Permalinks” in the list.
Then, you should select a permalink you like and scroll down to the bottom of the following page to click “Save Changes”.
What you have done just now will update the permalinks settings and refresh the rewrite rules, and fix the 404 error.
If the issue still exists, you need to login to your server via FTP, and manually update the .htaccess file. To be specific, you should temporarily set the file writeable by changing the permissions to 666. Next, repeat the previous method. Remember to re-change the permissions to 660 after that.
Alternatively, you can manually insert the following code in your .htaccess file:
Issues on Pages and Links
- Visitors come across the 404 error if the posts, pages, tags and categories they visit have been deleted from your site.
- People may be also presented with a 404 error page they happen to click the link that has been misspelled or broken.
Resolutions: Use 301 Redirection
Using 301 redirection is a smart method to fix 404 error. When visitors come to your site and this redirection will lead them to a page that is related to the unavailable content or a page that they can find answers to their original query. To do this, you can install one of the WordPress plugins listed below.
- Redirection: Redirection is a free WordPress plugin coming with rich features. It provides 404 error monitoring that captures 404 errors on your website and allows you to easily map these to 301 redirects. With it, you’re able to manage 301 redirections and keep track of 404 errors.
- 404 to 301: With 404 to 301, things can be easy. It can help to handle all 404 errors for you and redirect them to any page or custom link based on your needs and preferences.
- Eggplant 301 Redirects: Eggplant 301 Redirects plugin helps you easily manage and create 301 redirects for your WordPress site to improve SEO and visitor experience. It has a robust and user-friendly interface, which allows you to create and validate redirects with ease.
How to Enable 301 Redirection Using a Plugin?
Now, we would like to use one of the above mentioned plugins of Redirection to show you how to fix a 404 error page in the following parts.
If you haven’t installed this Redirection plugin, the first thing you need to do is to install it. Specifically, go to your WordPress Dashboard, hang the pointer on “Plugins” and click “Add New”.
Then, enter “Redirection” in the “Search Plugins” box and find the right one from the search results here on the page. Click “Install Now”.
After installing, click “Activate Plugin”.
After installing and activating, go to “Tools” under Dashboard on the left side menu and click “Redirection” in the expanding list as the screenshot shows below.
Now, you can see a page like this.
Before having any further move here, you need to go to your Google Webmasters tool account in the browser and click the domain name that you want to analyze and deal with 404 error. Next, click “Crawl” to expand it and then click “Crawl Errors”. On the right side, you’ll see a list of 404 error results.
You can click any of the links and there will be a pop-up window displaying that detailed 404 error information, including the crawl time and detect time.
To create a 301 redirection for this 404 error, return to your WordPress Dashboard, click the “404s” link on the “Redirection” page, and you will see the source URL captured on the Google Webmasters error page. Then, you can create a 301 redirection for the URL and direct it to other page on your site. Click the “Add redirect” link.
On the bottom of the page, you can find the section of “Add new redirection”. Here, you should enter the URL which you want to redirect in the “Source URL” box, and then enter a valid destination URL in the “Target URL” box. This is where your 404 error page will be directed to when visitors click it. Once done, click “Add Redirection”.
After you have created the 301 redirection successfully, click the “Redirections” link and you can see the record on the page. Here you’re able to see the number of hits this URL received.
Things haven’t finished yet. You need to return to your Google Webmasters tool account once again, and find the 404 error URL you have fixed just now, and then click “Marked as fixed”.