404 not found

How to Fix 404 Not Found: Step-by-Step Guide

Out of all potential 4xx status codes, “404 Not Found” is the most tamer one. It shows the visitors that the page they are looking for is unavailable on the website’s server.

In many cases, seeing this status on a website isn’t a big cause of concern. It typically happens when a visitor has mistyped your URL.

However, if these status errors are triggered by broken URLs, missing images, or faulty JavaScript or CSS, then it might hamper your website’s health.

Such problems can stop search engine bots from crawling your pages properly and making it harder for people to find your content on Google.

In this blog, we’ll guide you to fix the 404 Page Not Found error by covering the key steps and insights.

Let’s get started!

What does the 404 Not Found mean?

The 404 Not Found error is part of the 4xx (HTTP status codes) family, indicating that the browser has reached the server, but the requested resources are missing.

Even though your overall website is fine, the 404 Not Found status will still show on the particular page.

Suppose someone tries to visit a page under the “/post-name” slug, but there are no contents or resources. This situation will trigger a 404 response code to the search engine, and a “404 Not Found” message will appear in front of the visitor.

These issues can appear due to incorrect URLs, missing or deleted pages, missing assets, DNS misconfiguration, etc. Resulting bad impact on your website’s equity and overall growth.

Therefore, it’s wise to stay ahead of the curve and be notified of these issues to keep your website bug-free.

Form of 404 errors

404 errors can appear in various forms. Check this list to see if you’re experiencing any of the following:

  • “Error 404”
  • “404 Not Found”
  • “HTTP Error 404”
  • “Not Found”
  • “Page Not Found”
  • “The requested URL was not found on this server”
  • “The page cannot be found”
  • “We can’t find the page you’re looking for”

The difference between hard 404 and soft 404

To effectively fix a 404 error, it’s important to understand the exchange of signals between a search bot and a page.

Based on these responses, 404 errors can be classified into two types.

Hard 404 error

A hard 404 is the actual HTTP status code for pages that don’t have any resources. When your server doesn’t use redirection, search bots crawl empty pages and receive a clear “404” response code from that page.

This response tells the search bots that the page no longer exists and shouldn’t be indexed.

hard 404

Over time, Google removed the page from search results. This helps crawlers focus on the pages you want indexed, which makes it easier for them to understand your site’s intent.

For example, if you try to access the URL “google.com/find-examples,” you’ll notice that there’s no resource available on the page. This absence means the URL is returning with a 404 status to the web crawlers.

To check the 404 status yourself, follow these steps: Open Chrome browser Turn on the developer toolsInspect the page  → Go to the Network option.

404 not found

If you don’t see the status immediately, try reloading the page, and it should appear.

Soft 404 error

In contrast, a Soft 404 isn’t a genuine 404 status code. Instead, it’s more of a workaround to transfer the link juice of a blank page. Rather than signaling a ‘404’, the server sends a ‘200 OK’ message to search engines by redirecting them.

This trick made search engines think the page is valid, even when it’s not. 

soft 404

Some webmasters use this method to transfer link juice from a missing page to an existing one.

However, if the redirected content doesn’t match the search intent, it can confuse search engines and negatively impact your website’s visibility.

soft 404 status

This is often seen with custom 404 pages designed to handle missing pages. Although they display a 404 message to visitors, they technically aren’t a real 404 page since they return a 200 OK status.

The most common causes of 404 Not Found

As 404 Not Found is a widespread website error, the typos also range from simple to complex which can trigger this issue. Let’s check some of them:

  • Moved or deleted page: If you delete or move a page, its URL will become a broken link, and both crawlers and users will see a 404 error.
  • Modified slugs: Changing slugs can lead to broken links, causing the old URL to show a 404 error.
  • Incorrect URL: This error usually happens when users type a wrong or misspelled URL in the address bar. It can also occur due to plugin errors that affect URL structures.
  • DNS misconfigurations: In case the Domain Name System configures to the wrong address then 404 error codes might appear on your website.
  • Cache problem: Misconfigured cache-control settings can prevent browsers or proxies from loading the latest version of resources, leading to 404 errors.
  • Missing page assets: Missing page assets like images, CSS, or JavaScript files can also trigger a 404 error.
  • .htaccess misconfiguration: Incorrect information in the .htaccess file, such as wrong rules, file permissions, or redirects, can cause a 404 error.
  • Check redirects: If you’ve set up redirects, make sure they are working properly. Misconfigured redirects can cause 404 errors.

How to check your website’s 404 error?

There are several ways you can check for 404 errors, including:

  1. Use Google Search Console: You can use Google Search Console to track 404 errors if it’s connected to your site. After logging in, go to Page Indexing > Not Found (404) to view a list of all URLs returning 404 errors.
  2.  Check server logs: Check server access logs from Cpanel (/var/log/apache2/access.log for Apache) or (/var/log/nginx/access.log for Nginx) to find URLs returning 404 errors.
  3. Browser developer tools: Open the developer tools in your browser → go to the Network tab, then reload the page and look for any requests that show a 404 status code.
  4. Website crawlers: Use web crawling tools like Screaming Frog, Ahrefs, or SEMrush to scan your site for broken links.
  5. Manual testing: Manually enter suspected URLs in your browser. If you see a ‘404 Not Found’ message, there’s an issue with that link.

How to fix 404 Not Found?

Fixing 404 Not Found errors may require simple steps, but precision is crucial regarding the implications. The solution might vary depending on the type or source of the URL. 

Here’s a step-by-step guide to resolve 404 Not Found errors.

Delete or modify URLs from referring pages

To delete or modify a 404 page, identify the source page that tells search engines about the broken link. You can use tools like Google Search Console or web crawlers for this.

Once you’ve found the referring page, decide on the best action based on the issue. If the URL is mistyped, simply correct it.

Alternatively, if the content is no longer available, remove the broken link from the referring page to avoid the 404 error.

Delete old page URLs from sitemap

Deleting a page from your sitemap depends on the website platform. If you’re using WordPress, just go to the settings of the plugin to manage your sitemap.

In alternative custom-coded sites, edit the sitemap codes manually.

Here’s how to do this for custom-coded sitemaps and two popular WordPress plugins:

1. Custom-coded sitemap editing

For a custom-coded website, you do not need to use any special plugin to edit the sitemap.

Open your custom sitemap (sitemap.xml) file from Notepad or any code editor. 

And follow these steps.

  1. Identify the old page (e.g., https://www.example.com/old-page) from your sitemap.
  2. Remove the URL from <url> to </url>.
  3. After deleting that portion of the code, upload the updated sitemap to your server again.

Before

After

Google will automatically crawl your sitemap and modify the latest information.

2. Edit the sitemap from Rank Math

If you’re using Rank Math on WordPress, start by navigating to the page editing section in your dashboard. From there, copy the Post ID from the URL.

Wordpress Page Id, post id

Next, go to the Sitemap settings in your Rank Math plugin. Scroll down until you find the Exclude Posts option.

Paste the Post ID of each post you want to exclude, separating them with commas.

Rank math sitemap settiing, Exclude post

Click the Save Changes button to save the changes. The page will automatically be removed from your sitemap. 

3. Disallow search engine for Yoast SEO

Yoast SEO lets you control crawling permissions for each page. To disallow an empty page, go to the Yoast SEO section in the page editor.

Then, navigate to the advanced options and find the “Allow search engines to show this content in search results?” setting. And, select “No” to prevent search bots from crawling that page.

Yoast seo, index permission

Configure the .htaccess file

Sometimes, a corrupted or misconfigured .htaccess file can lead to incorrect 404 error codes. You can resolve this issue by removing and regenerating the file. But before that, you need to take a backup of your website.

WordPress users can easily fix a malfunctioning .htaccess file by updating the permalinks. Here’s how:

1. Go to Settings in your WordPress dashboard.

2. Select Permalinks and click Save Changes without altering any settings.

This action often resets the .htaccess file and resolves any unusual issues.

WordPress, htaccess reset

In case you’re not using WordPress, access the File Manager in your hosting server and navigate to the public_html directory. Locate the .htaccess file, rename it temporarily, and then rename it back to .htaccess. This will effectively reset the file.

Clear your cache

Sometimes, typos can be surprisingly common. Therefore, start by refreshing the page and carefully checking the URL.

If you still encounter a 404 error, try accessing the link in Incognito mode or on another device. If the page loads successfully, in either case, the issue is likely related to your computer’s cache.

Chrome cache clear

Alternatively, clearing your website’s cache can sometimes help resolve 404 errors. Especially, when these errors are caused by outdated or corrupted cached content being displayed to users.

In WordPress, deleted images, plugins, and other files are often left behind as cached data. These broken files or links can trigger 404 errors or other issues.

To prevent this, use caching plugins like W3 Total Cache, WP Super Cache, or LiteSpeed Cache to regularly clear the cache and keep your website lightweight and error-free.

Set up redirects for 404 Not Found pages

Redirection is a widely used method by technical experts to counter 404 Not Found pages.

But, is it a good idea to redirect your 404 page to your home page or any random page?

The answer to the question is “NO”.

Redirecting an error page like that is generally not a good idea. This technique might have worked in past circumstances.

However, with modern ranking techniques, if external or internal links point to a deleted page that redirects randomly, the potential SEO value of those links is lost.

It’s also misleading for search engines, as they may see this as an attempt to manipulate rankings, which can harm your site’s credibility.

So, be very cautious while choosing a redirect page. If you have a small website with 30-50 pages, we suggest you use the techniques above to solve 404 Not Found errors.

As a new website, you might encounter a few errors that you can fix manually using these techniques. Addressing these issues will enhance your website’s equity and potential.

Alternatively, in big website (website with many pages) cases, it is not possible to counter the vast amount of 404 pages. The numbers can be in thousands. So, you have to use redirects in some specific situations. 

Before diving into the typos, here are some redirection plugins that might help you set up 301, 302 redirects, or 404 error tracking.

  • Redirection: This popular WordPress plugin helps manage 301 redirects and track 404 errors.
  • Rank Math: An all-in-one SEO plugin with a powerful redirection manager and 404 monitoring to fix broken URLs and boost site health.
  • Yoast SEO: The premium version of Yoast SEO includes a redirection manager, ideal for handling 404 errors.
  •  Simple 301 Redirects: A lightweight plugin built to handle basic 301 redirects for sites that don’t require advanced SEO tools.

Now, let’s use redirects for 404 pages.

1. Pages with non-replacement contents

Imagine the 404 error page is completely deleted. There is no similar or relevant replacement content available. In that case, it’s best to leave the page as a true 404. This tells both users and search engines that the content no longer exists.

Or, provide a user-friendly custom 404 page with helpful links or a search bar to guide users to other relevant parts of your website.

A good 404 page should have these features:

  • A clear statement that the page the user requested isn’t available
  • Advice to help your users correct a possible mistake in the URL
  • The main header and footer navigations
  • Links to important sections of the website
  • A search bar for the website’s internal search function

Here are some examples of custom 404 pages.

2. Pages with replacement contents

Suppose a page has been removed or merged into another page, but you have similar or updated content available under a different slug.

In that case, set up a 301 redirect to the most relevant page that replaces or closely matches the deleted content. This is a permanent redirect that preserves SEO value (link equity) and directs users to relevant content.

For example, if you delete a product page, redirect users to a similar product or category page.

3. Typos or broken links

A 404 occurs because of a misspelled URL or broken link that was previously working. In this case, set up a 301 redirect to the correct page. 

This ensures that users who mistype the URL or click on an outdated link are automatically directed to the correct content.

For example, if “example.com/produc” results in a 404 then redirect it to “example.com/product”. It might show a soft 404 but doesn’t break the search intent and this link equity.

4. Changed URL structure

Sometimes, site redesigning or restructuring can change your URL structure. In this case, use a 301 redirect to guide users to the updated location. 

Suppose, the URL “example.com/blog/2023/my-article” is changed to “example.com/articles/my-article”. Use redirection from the old URL to the new URL to preserve link equity and avoid losing traffic.

This is crucial for maintaining both SEO ranking and user experience.

Wrapping up

Unfortunately, the 404 Not Found error is a continuous and persistent issue that you may never fully eliminate. If someone claims otherwise, it’s likely misleading, as users can’t control every mistyped URL.

Therefore, it is best to consistently monitor your website for 404 errors and apply the most suitable solutions from the methods mentioned earlier. By doing so, you’ll be able to improve the customer experience on your website and the health score.

Fix 404 Not Found – FAQ

Here are the answers to some common questions about the 404 Not Found error.

Not always. A 404 error usually occurs when a page is deleted or moved, or the URL is mistyped. But continuous monitoring is important.

Depends on the cause. Temporary or under-maintenance pages can be fixed, but permanently deleted or mistyped URLs may still trigger a soft 404 warning, even if redirected.

While it’s not a critical error, it’s bad for user experience and SEO if left unresolved.

404 errors can’t be fixed in one click, but tools like Ahrefs, Screaming Frog, Semrush, and Google Search Console can help you find them. Once spotted, you can manually fix the issues.

Besides clicking a broken link or typing a wrong URL, permanently deleted pages cannot be accessed from the backend unless restored.

Tired of buying addons for your premium helpdesk?

Start off with a powerful ticketing system that delivers smooth collaboration right out of the box.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Get support insights directly in inbox!
Blog subscribe form
Fluent Support
Best AI-Powered Helpdesk in WordPress