How to Fix 404 Errors on Your Website - Toolsem Guide

How to Fix 404 Errors on Your Website
How to Fix 404 Errors on Your Website

Do you know what sucks when browsing any website?

You get a 404 error page from your browser.

Even if someone types a website's URL wrong or a page doesn't exist, it does not matter. 404 errors can hurt your brand and make it tougher for search engines to go through your site, which can harm your SEO (the thing that helps your website show up in search results).
Luckily, there are some easy solutions to fix 404 errors on your website.

In this guide, we will discuss how to identify and fix 404 errors on your website, so you can improve your branding and SEO.

(toc)

What are 404 errors?

A 404 error, also known as a "page not found" or "unable to locate" error, is a standard HTTP status code that indicates that the client was able to connect with a given server. However, the server was unable to locate the requested page. This can happen for a variety of reasons, such as if you have deleted the page or moved it to a new URL without updating the links to it. [What are HTTP status codes?]

Here is a simple to explain of a 404 error (also referred to as an HTTP 404 or 404 code):

A 404 error is what you get when you try to visit a web page that doesn't exist. It's like trying to go to a house that doesn't exist. The address is wrong, so you can't get there. Similarly, the search engines are unable to locate the requested URL.


Why are 404 errors bad?

404 errors can be bad for a few reasons. First, they can frustrate your visitors and make them leave your website. Second, they can hurt your website's ranking in the search engine. Third, they can make your website look unprofessional. Finally, a 404 error could be a sign of a security issue on your website, such as a malware infection.

Error 404: Hard vs. Soft

  • Hard 404 error: A 404 error that commonly occurs when a page has been deleted or moved. When a user tries to visit a page with a hard 404 error, they will receive a 404 error message from the server. 
Here are some examples of a hard 404 error:
  1. A page that has been deleted or removed.
  2. A page that has been moved to a new URL without updating the link to it
  3. A page that is blocked by a robots.txt file
  4. A page that requires authentication
  5. A page that has a typo in the URL
  • Soft 404 error: A 404 error that occurs when a page exists but is not accessible to online search engines. Soft errors (404) can be caused by several things, such as:
  1. A page that returns a 403 Forbidden Server Error code
  2. A page that returns a 500 Internal Server Error status code
  3. The page is blocked by a robots.txt file.
  4. The page is password protected.
  5. The page is only available to certain users or groups.
  6. A 404 page title is set to noindex.
When a search engine encounters soft errors, it will not index the page. As a result, the 404 page does not appear in the query results.

Note: Soft errors are not as harmful as hard 404 errors. However, it is still important to fix 404 errors because they can hurt your website's ranking in web robots results. On the other hand, it may signal that your website is not well maintained or has low-quality content.

Other examples of hard and soft 404 errors:

Hard 404 error:

https://example.com/page-that-does-not-exist: This page does not exist on the server.
https://example.com/page-that-has-been-moved: This page has been moved to a new URL, but the link to it has not been updated.

Soft 404 error:

https://example.com/page-that-is-blocked-by-robots-txt: This page is blocked by the robots.txt file, so search engines cannot index it.
https://example.com/page-that-is-password-protected: This page is password protected, so only authorized users can access it.
https://example.com/page-that-is-only-accessible-to-certain-users-or-groups: The page is only available to certain users or groups.
https://example.com/page-that-is-set-to-noindex: This page is set to noindex, so the search engine will not index it.

Here is a summary of the difference between hard and soft 404 errors:

Hard 404 error:
  • Are caused by a page that does not exist or is not accessible.
  • Return a 404 Not Found status code from the server.
  • Are harmful to your website's SEO.
Soft 404 error:
  • Are caused by a page that exists but is not accessible to search engines.
  • The server may return a variety of status codes, such as 403 Forbidden, 500 Internal Server Error, or 200 OK.
  • It is less harmful to your website's SEO than a hard 404 error, but should still be fixed.
If you find a 404 error on your website, be sure to fix it as soon as possible. To clarify, improving your website's user experience and search engine optimization (SEO) performance is very important. On the other hand, it will reduce bounce rates on your site.

How to find 404 errors

In this case, we will know four different methods to find a 404 error on your website. 
  1. Use a site crawler like Screaming Frog: This tool will scan your website and identify all of the broken links that could lead to a 404 error.
  2. Check Google Search Console: GSC is a free tool that will show you a list of all of the pages with a 404 error on your website.
  3. Check Bing Webmaster Tools: One of the features of Bing Webmaster Tools is the ability to find 404 error codes on your website.
  4. Dead Link Checker: This free tool Checks up to 2,000 links on your website to see if any are broken.

1. Using Screaming Frog SEO Spider App Site Audit

Here are the steps to run a site audit using the Screaming application:
  • Download and install Screaming from their website.

Download Screaming Frog from their website
Download the Screaming app. from their website.
  • After launching the software, enter the website URL you want to audit and click "start".

site audit and start by Screaming Frog.
site audit and start with the app.
  • Then, select Response Codes from the top menu.

Screaming Frog Menu Response Codes
Selecting Response Codes
  • Filter for Client Error 4XX to get a list of all pages returning a 404 error status.

Screaming Frog Filter for Client Error 4XX
Choose Filter for Client Error 4XX.

Screaming Frog SEO is limiting crawling in the free version to 500 URLs only. So, if your website has 500 URLs or less you can use it to find a list of error 404 codes but only show broken links.

2. Check Google Search Console you can find every 404 error

Google Search Console provides a list of all error status codes 404 that Googlebot finds on your site, including both hard 404s and soft 404s.

Here are the steps to check in Google Search Console:
1. Log in to the Search Console.
2. Click "Pages" in the left-hand sidebar.
3. Select the "Not indexed" tab.

Not indexed tab in GSC
Not indexed tab in GSC

4. Scroll down to "Why pages aren’t indexed".
5. Click "Not found (404)".
hard 404s and soft 404s in Google Search Console
Hard 404s and Soft 404s in Google Search Console

This will show you a list of all the pages on your website that Google has found that are returning the Not Found (404) or a soft 404 error.

3. Check Bing Webmaster Tools

By checking Bing Webmaster Tools, you can find all 404 errors.
Login to the Bing Webmaster in the Site Explorer > Filter by URLs with crawling issue. You can use the crawl information to identify and fix the 404 error on your website.

Bing Webmaster Tools Site Explorer
Bing Webmaster Site Explorer

4. Find 404 errors using the Dead Link Checker tool

Site Checker is a free broken link tool. Dead Link Checker is similar to Screaming Frog SEO. You can check the whole website or a single webpage. But you can use the tool to check up to 2,000 links on your site to see if any are broken.

Here is how to use Dead Link Checker:

Enter your website URL. Then check the whole website or check a single webpage by checking the box. And click "check".

Dead Link Checker tool
Dead Link Checker Tool

The tool gives you the report with the status 404 Not Found, 403 Blocked, 400 Bad Requests, etc. Also, the source URL and anchor text.

How to fix 404 errors

Once you have found a 404 error on your website, you need to fix them. There are a few different ways to do this.
  1. Redirect the 404 error. If the page that's no longer there has been moved to a new URL, you can redirect the 404 error to the new URL. This will tell users where to go to find the information they're looking for.
  2. Restore the page. If the page that's no longer there is still important, you can restore it. This may involve copying and pasting the old content into a new page or restoring the page from a backup.
  3. Correct the link. If the 404 error is caused by a broken link on your website, you can simply correct the link so that it points to the correct URL.
  4. Create a custom 404 page. If you have a lot of 404 errors, you may want to create a custom 404 page. This is a page that will be shown to users when they try to visit a page on your website that doesn't exist. That is to say, a custom 404 page can help to improve the user experience (UX) and encourage visitors to stay on your website.

If you have a lot of 404 errors, you will need to prioritize your efforts. Start by fixing the 404 error status on your most important pages, such as product pages, contact pages, and service pages. In some cases, you may also need to check for errors in your http header.

How to Find and fix 404 errors in WordPress

If you have a WordPress website, as I have noted above, you can use the same steps to find a 404 error.

Great, Found them?. Now let’s fix the 404 error in WordPress.

Fixing a 404 error caused by changing the permalink structure

If you have changed your permalink structure, WordPress will automatically redirect old permalinks to new permalinks. However, sometimes this may not work correctly, resulting in a 404 error.
To fix the 404 error status caused by changing the permalink structure, you can follow these steps:
  1. To update your settings, go to "Settings Permalinks" from the WordPress dashboard.
  2. Then click the button “Save Changes” once you are done with the page.

This will force WordPress to regenerate the rewrite rules for your permalinks. This will fix any HTTP 404 or 404 code that is caused by old permalinks.

Fixing a 404 error for specific pages

The most common way to fix a 404 error is by redirecting the specific page to the correct new location. In this case, it is possible by using a variety of methods, such as editing the. htaccess file or using plugins.
However, this is a more technical solution, and it is important to back up your .htaccess file before making any changes.

If some of your pages are returning a 404 error, even after you have regenerated the rewrite rules, you need to set up 301 redirects for them. 301 redirects are permanent redirects that inform search engines that a page has moved to a new location. This ensures that visitors to your website are automatically redirected to the new page and that your website's SEO is not affected.

To set up a 301 redirect for a page, you can use the Redirection plugin. The Redirection plugin is a free and easy-to-use plugin that can be redirecting you from any URL on your WordPress site to any other URL.

To use the Redirection plugin by redirecting a URL, follow these steps:

1. Install and activate the Redirection plugin.

Redirection plugin
Redirection plugin

 2. Log into your WordPress dashboard and select Tools > Redirection.

WordPress dashboard
WordPress dashboard

3. Click on the Add New button.
4. In the Source URL field, enter the URL that you want to redirect.
5. In the Target URL field, enter the URL that you want to redirect the page to.
6. Click on the Add Redirection button.

The Redirection plugin will now redirect any visitors who try to access the Source URL to the Target URL.

Besides, by doing the preceding, you can fix all 404 code errors on your WordPress website.

How Often Can You Check for 404 Errors?

The frequency with which you should check for 404 errors depends on the size of your website.
  • Sites with less than 50 pages: Check for the 404 error every month or so.
  • Sites with 50-1000 pages: Check for the 404 error every week or every other day.
  • Larger sites with more than 1000 pages: Check for a 404 error every day.

Without delay, if you have made any recent changes to your website.
Such as:
  • Adding new pages
  • Deleting pages
  • Moving pages to new URLs.

With this purpose in mind, you may also want to check for a 404 error more frequently.

Code to Redirect to Homepage on 404 Error in Blogger

To redirect users to the homepage on a 404 error in Blogger, you can use the following code:

Code to Redirect to Homepage on Blogger
Code to Redirect to Homepage on Blogger


<!-- Code to Redirect to Homepage. -->

<b:if cond='data:blog.pageType == &quot;error_page&quot;'>

<blockquote>
<p style="text-align: center;"><span style="color: #00fca9; background-color: #000000;"><strong>Oops! This Page does not exist. Sorry for the inconvenience.</strong></span></p>
<p style="text-align: center;"><span style="color: #00fca9; background-color: #000000;"><strong>We are redirecting you to Home page now.</strong></span></p>
</blockquote>

<meta content='5;URL=https://www.toolsem.com/' http-equiv='refresh'/>
</b:if>

<!-- Code to Redirect to Homepage. -->

The above code you can use to redirect your audience to the homepage of your Blogger blog whenever they try to access a page that does not exist. Error is to redirect called redirecting to 404.

To use this code, simply copy and paste it into the HTML editor of your Blogger blog's template. The code should be placed in the <head> section of the template.

You can use the code by going to Blogger > Theme > Edit HTML. Now click the "Save" button.

After you enter the code, the page looks as seen in the picture below:


Code to Redirect to Homepage on 404 Error in Blogger
Code to Redirect to Homepage on 404 Error in Blogger

Now, whenever a reader tries to access a non-existent page on your blog, they will be automatically redirected to the homepage.

Here is a breakdown of what the code executes:

  1. The tag checks to see if the current page is an error page.
  2. If the current page is an error page, the code displays a message to the visitor and then redirects them to the homepage after 5 seconds.
  3. The tag is used to specify the refresh time for the redirect. In this case, the redirect will occur after 5 seconds.
  4. The http-equiv='refresh' attribute tells the browser to refresh the page after the specified amount of time.
  5. The `URL=https://www.toolsem.com/' attribute specifies the URL of the page that the user will be redirected to. Don't forget to include your blog link!
You can change the code to suit your own wants. For example, you can change the redirect time or the link of the page that the visitor is redirected to. You can also add additional CSS styling to the message that is displayed to the social media user. Additionally, you can modify the HTTP header that is sent on the response page.

Tips:
Error is to redirect to avoid it. Create a custom 404 error page that provides service users with helpful information and links to other pages on your website.

 

Conclusion

The 404 errors or HTTP 404, which are server errors that occur when a client tries to access a page that does not exist, are a common problem for all websites. However, they are relatively easy to fix. In conclusion, you can identify and fix 404 errors on your website through the steps outlined in the body of this guide. Not only will you improve the user experience, but you will also help your website rank higher in search engine results pages (SERPs). Finally, you can keep your website free of 404 errors and provide users with a positive experience.


FAQ: 404 Errors

 What is a 404 error?
A 404 error is a type of error that occurs when a subscriber tries to access a page on your website that they are unable to locate or does not exist. It is one of the most common errors that users encounter on the web.

Is it possible to bypass a 404 error?
No, you cannot bypass a 404 error. A 404 error is a response from the server indicating that the requested page cannot be found.

What are the most common ways to fix a 404 error?
Redirect the broken link that is unable to locate the requested page to another location.

How can I prevent 404 errors from happening in the first place?
  1. Regularly checking your website for broken links
  2. Creating a custom 404 error page
  3. Redirecting users to relevant pages when you delete or move pages on your website
  4. Using a content delivery network (CDN) to serve your website's static files

How to fix 404 errors on mobile devices?
  • Restart your browser. This can sometimes fix minor glitches that may be causing the 404 error.
  • Clear your browser's cache and cookies. This can remove any outdated or corrupted data that may be causing the 404 error.
  • Check the URL for typos. Sometimes, a 404 error can occur if you have misspelled the URL.
  • Try accessing the page from a different browser. If you are still getting a 404 error, try accessing the page from a different browser.
  • Contact the website owner. If you have tried all of the above and are still getting a 404 error.
Error is to redirect! If you are the website owner, you can fix the 404 error on mobile devices by following the same steps that you would follow to fix the 404 error on desktop devices.

Comments

Popular posts from this blog

How Website Speed Optimization and Why It Matters

10 Email Templates That Will Make You Look Like a Pro

Social Media Marketing in Digital Marketing: Effective Guide 2024