WordPress is a vast, limitless place. One change on your website can impact the entire look or functionality of your website.
Making a slight tweak on one web page can sometimes create problems in other pages. This generally happens when you are unfamiliar with certain functionalities on WordPress.
You may change one web page, making another page inaccessible without even realising.
In this case, your users may be unable to visit your website without you finding out for months. This may impact the experience users get from your website.
What is a 404 error?
One of the most common error that occurs on your website is the 404 error. A 404 error originates when your users get directed to a URL that may not be available anymore.
They see a “Page Not Found” popup appear on the page when this happens. It refers to the error displayed on browsers when people cannot find a page they’re looking for.
Even if it exists, if search engines are not able to find your page, they will show the 404 Error.
A 404 error originates when you make some tweaks to the web page or it’s URL, making the URL no more accessible.
To undo the change, most WordPress owners generally redirect the URL to another page. This may be one of the simplest solution, but it is not the best one.
Finding a solution to any WordPress problem is extremely easy. Under most cases there are multiple solutions. Same is the case with a 404 error.
There are many ways to tackle the situation and which option is better for you depends on your website.
Why you need to remove the 404 errors?
These errors are easy to remove, but they can be painful for your website image if not dealt with properly. They have serious repercussions including:
- Increasing the bounce rate of your website.
- They are frustrating for your users and can make you lose them forever.
- These errors make you look unprofessional
How to detect these 404 errors?
Any URL that doesn’t work is referred as broken. On your website, over time some links may stop working or may have been removed by you.
If this change or removal process ios not executed properly it may lead to a error. Check each of them manually may be too much of a task.
One easy way to do the same is by using the plugin Broken Link Checker. This plugin will automate the process of checking all links on your website.
It tells you which links are working and the ones that have some issues. After you have learnt that, you can directly jump to the page and fix it.
How to fix the 404 errors?
If you know WordPress, you would know by now that it focuses on providing flexibility to users.
That is the main reason why there are more than one ways to remove a 404 error from a website.
These ways are explained in detail below.
#1 Redirecting Links With The 404 Error
If you see a 404 error on one of your web pages, you can choose to redirect your user to another custom page.
Redirecting is when you take a user who was visiting a broken link to another page automatically.
Your goal here is to make sure your user visits a similar content and to not show him/her a broken link.
This will send him from a non-existing link to one that works perfectly.
There are plugins available out there you can use to redirect broken links. A plugin like Redirection can be used here.
After activating the plugin from the admin section, do the following.
- Head to the “tools” option on the admin panel and click on the redirection tab.
- In the tab you find a list of all the links that are redirected, hence it will be empty for now.
- Here you can add all the links you want to redirect.
- Under the source URL option, choose the URL that is broken. Choose the target URL as the link you want people to see when they search for the broken link.
The plugin will start recording all 404 errors on your website under the 404 tab within the plugin.
Check this section regularly to keep your website up to date.
#2 Fix The Permalink Settings Manually
Under certain conditions, WordPress starts showing 404 error even though your posts are may be working perfectly.
Firstly don’t panic, this is a very common bug that appears because of your permalink structure.
It doesn’t mean that there’s something wrong with your pages or posts. Follow these steps to solve the issue:
- Go to your WordPress dashboard and check the options on the admin panel.
- Go to settings and choose permalink tab from there.
- Scroll to the bottom of this page and click on”Save Changes” button from here.
- This prompts WordPress to save a new .htaccess file, changing the permalink settings on your website.
This error usually appears when your .htaccess files get deleted somehow or if something goes wrong with the rewrite rules.
Hence you fix your permalink settings. This change will will flush the rewrite rules.
If this does not solve your issue, you will have to manually change the .htaccess files. This brings us to our next solution.
#3 Rewrite Your .htaccess Files Manually
If the previous solution does not work for, there is some issue with the backend of your website.
You will thus need to get back there and solve the issue using some coding. You can make the changes using these steps:
- Use the WordPress credentials you have received from your web host.
- Once you have logged in, access the WordPress root folder. This folder is usually named after your site or public_html.
- The file we are looking for will be called .htaccess. Download this file, so you can undo any unwanted changes.
- Choose the edit/view option to make any changes.
- The file will open up under default text editor. Delete the contents available there and replace them with the following code-
Once you save these changes, your broken URL will work again.
The way your website looks and work impacts user’s viewpoint about it. Make sure there are no errors on your website that you are unaware of.
Keep your website updated and all pages in check. Checking all broken links is a great step towards the same.
Make your website error-proof and experience your users become more receptive towards you.