Error 404 Not Found: What Is and How to Fix It

The 404 error is an HTTP status code that indicates that a web page cannot be reached.

The page not found error can have various causes. It depends on a problem on the website, on an error in the link that takes us to that page, or on connection and configuration problems on the device used.

Let’s find out all the secrets of the 404 not found error, what are all its causes and how to fix it.

What Is The 404 Error?

The 404 error is an HTTP status code, i.e. a number that indicates a problem in passing data from the server to the browser.

The client (your browser) makes a request to the host (the website’s server), but this request cannot be completed. Therefore, an HTTP error code is sent to the client.

In this case, with the 404 error, the host informs the client that the URL entered does not exist, and it does not lead to any resource.

error 404 not found

In other words, the 404 error indicates that the server is functioning without problems (i.e. it is actually reachable), but the host could not find the page requested. In fact, if the server was configured incorrectly or if there was a request overload problem, we would have a different error code.

What Does The 404 Error Look Like?

All browsers have a default page for the 404 error. The message that appears on the screen can be:

  • Error 404
  • 404 Error
  • Not Found
  • 404 not Found
  • Page not Found
  • HTTP 404 Page not found
  • Error 404 The page you are looking for cannot be found.
  • Bad request/invalid URL
  • The requested URL /bad page was not found on this server. That’s all we know.

And other variations.

Here’s how it looks on Chrome:

And here’s the error 404 on Microsoft Edge:

On Opera, it looks like this:

 

While on Mozilla Firefox is like this:

However, any website owner can set up a custom 404 page.

In this way, a visitor who is faced with an error of this type will be able to have more information on how to find what he is looking for (which helps improve the user experience).

For example, there may be a search field on the page, links to the main content section, a list of categories, a contact form, etc.

Some websites have created original and creative 404 pages. Thrivemyway has this one:

Causes Of The 404 Error

The reason a page isn’t found is mainly because the client requests the host for a URL that doesn’t exist, which doesn’t lead to any resources.

But what caused this problem?

Some of the cases that cause a 404 error include:

  • The URL is typed incorrectly (for example, if you enter the URL directly into the address bar of the browser and make a mistake)
  • There’s a broken link (you click on a link that was entered incorrectly. There could be a typo or error in the code)
  • The page has been deleted or moved (you want to visit a page that has been erased or modified by the website owner)
  • DNS-level filters are active (if you cannot see an entire website, it is possible that your internet service provider has applied restrictions for that kind of content)
  • The website has a DNS configuration error (the site has just been created or transferred to another provider and the DNS has not yet propagated, or they have been set incorrectly).
  • There are caching issues (your browser is still showing the cached 404 version of a page, even when it’s already fixed and working on other browsers).

Now that we have seen the possible causes of the 404 not found error, let’s find out how to fix it.

How To Fix The 404 Error

Some reasons why you see the “Error 404 not found” message depend on the visitor, while others depend on the website.

Let’s try to fix it in both cases.

What To Do If You Visit A Website And Get The 404 Error

If you have landed on this article because you are an internet surfer and you want to know more about how to solve this error, this section is for you.

First, how did you get to the 404 page?

Did You Type The Url Directly?

Then double-check what you wrote. There may be typos.

Remember that a web address is made up of several parts, namely:

  • HTTP or HTTPS;
  • the symbols “://”;
  • the string www followed by a dot may or may not be present;
  • the domain formed by the name, a period, and an extension;
  • the domain can be preceded by a subdomain, i.e. by another name, separated from the domain with a dot;
  • there may be a slash / followed by other alphanumeric characters, which indicate the name of the page;
  • there may be other bars and other characters.

Knowing what a URL is and its component parts will help you pinpoint the problem.

So check if you typed the URL format correctly. Here are some examples of how it can be structured:

The first is the URL of a blog post. In the second case, it’s a particular page in the website’s subdomain.

Pay attention! Forgetting even one dot or slash can cause a 404 error or other types of errors.

If the structure is correct, make sure that the domain name and all other words that make up the URL are also valid.

Did You Click On A Broken Link?

If you landed on a 404 not found page by clicking on a link (from the same website or from an external site), it is possible that the developers themselves made a typo.

Go back to the link, hover over it, and you should see the full URL in the bottom corner of your browser window. Can you spot the error?

In these two cases, if you notice a wrong letter or the lack of a dot or a slash, it is easy to solve the 404 error. If, on the other hand, everything seems normal to you, the page may have been moved, that is, it has changed its URL.

Here’s how you can find it without necessarily having to contact the site owner.

One solution may be to simply search the website for keywords related to the topic you are interested in. If the site does not have a search field, you can write the following search command on Google:

site:yourwebsite.com + your keywords

For example, entering on Google the following search operator:

site:thrivemyway.com/blog blogging statistics

It will list on Google the pages about that keyword within Thrivemyway.com

Now, if all this does not lead to solving the issue, then it’s time to contact the site managers.

Inform them of the topic you were looking for and also include the link causing the error in the message, explaining where you found this link.

They will most likely reply thanking you for the report and providing you with the correct link.

What To Do If You Have A 404 Error On Your Website

If you’re reading this guide because you have a website and there are 404 errors on your pages, here’s what you need to do.

The Error Affects Only One Or Some Pages

If you have a 404 error on one or more pages/articles of your site, you probably have:

  • changed the URL of the page;
  • deleted the page;
  • moved the page to drafts.

First, you have to ask yourself:

“Has this page been moved because it was no longer needed, or was there an error and should it be published instead?

If you think it should be reachable, here’s how to proceed.

If it’s a page, from your WordPress Dashboard go to Pages > All Pages, and if it’s a post go to Posts > All Posts.

Type the words that make up the page title into the search field. If you don’t remember exactly, you can enter other keywords in the title or text.

If you find the page, check if it is published or in drafts (in which case you will see the Draft label next to the title).

If you don’t find it, click on the Trashed link before the list and search again (if you don’t see the Trashed link, your trash is empty).

Here’s what to do to fix the 404 error, step by step.

The page (or article) is published:

  • Check the complete URL and compare it with the one that generated the error.
  • If you notice any differences, correct either the URL of the page or the link that caused the error. Here it is up to you to figure out which option is better.

The page is a draft:

  • Again check the URL to make sure it is still correct. 
  • Publish the page.

The page has been deleted:

  • Move the mouse over the title, links will appear
  • Click on Restore
  • Make sure the page has been moved to published and verify that the URL is correct.

If, on the other hand, this page was moved intentionally (because, for example, you replaced it with another one that has a different URL), do this.

First, locate the URL of the new page and fix all the broken links on your site that lead to the old page.

Then set up a redirect from the old URL to the new one. This will ensure that any external links to your site are redirected to the correct page, and Google will also know that the page has moved to the new address.

You can set up a redirect with a plugin (for example, Redirection) or by editing your website’s .htaccess file (here’s a handy guide).

The 404 Error Affects Your Entire Website

If you can’t view a single page on your site, then there could be a DNS problem (first, of course, make sure you’ve written your domain correctly).

Have you purchased a hosting and domain plan, or transferred your domain or site recently (24-48 hours)?

If you did everything correctly, it’s possible that the DNS hasn’t propagated yet. In fact, it usually takes up to 48 hours for the domain to connect to the hosting where the site is located.

If you have performed the procedure for more than 48 hours, check that the DNS is set up correctly:

  • Go to the domain management section in your provider’s user area
  • Check the DNS values set
  • Make sure they are from your hosting (usually, you find the DNS of your hosting in your user area, in a section called Nameserver (or NS)
  • If they are incorrect, replace them with those of the hosting.

In the following image, for example, you see the user area section where you can change DNS in the GoDaddy dashboard.

The Error Affects Almost All Of Your Website

If you have Error 404 on all posts on your site, excluding pages, then you probably changed the permalinks.

Permalinks are the URL structure of a WordPress site and are applied to posts. In your Dashboard, from the Settings > Permalinks section, you can choose how permalinks are created.

If you’ve made changes on this page, all of your article URLs have changed, but the links to them have remained the same.

For example:

  • previous structure Day and name: https://thrivemyway.com/2022/09/07/example/
  • current structure Article name: https://thrivemyway.com/example/

If you want to keep the new permalinks, the only thing to do is set up redirects from the old structure to the new one.

How Do I Know If There Are 404 Errors On My Site?

All of these tips for fixing the 404 error on your website are invaluable, but they depend on one fundamental premise: you know about the error!

You have probably come across a page not found simply by browsing your site and so you have taken action to resolve it as soon as possible.

But how do you know if your site has other 404 errors?

No, you don’t have to click on all the links and try all the pages, there are much simpler systems.

The most effective is the Google Search Console

In the GSC menu, select “Indexing” and then “Pages“.

Scroll down to the section “Why pages aren’t indexed“. Select “Not Found (404)“:

Here you will find an Errors section where all the 404 errors that occur on your site will also be present.

You’ll notice that some are due to changes on your pages, while others can simply be typos from visitors to your site.

Knowing what the most frequent 404 errors are will help you prevent them from happening again in the future.

Another very useful tool is called Broken Link Checker, a handy plugin that checks all links on your WordPress site and detects 404 errors.

This plugin is really useful:

  • also works for any missing images;
  • automatically creates settings to prevent Google from following these links;
  • allows you to make corrections directly from the list (i.e. without opening the page where the link is).

To prevent 404 errors caused by page and post URL changes, you can also use the SEO Rank Math plugin. Among its various very useful functions, there is also the creation of automatic redirects every time you change a URL.

Conclusion

The 404 error is quite nasty, whether you are on the visitor side or on one of those who create web pages.

Running into a 404 error, especially if there’s no custom page to guide you to the resource you’re looking for, is frustrating.

If, on the other hand, you have a site with several non-existent pages, there can be consequences for SEO and loss of trust on the part of visitors.

In any case, this guide has told you how to solve the 404 error and find your lost content!

How do you usually deal with a 404 error?

Do you know of any other ways to fix it?

Leave a comment if you still have doubts and if you want to tell us about your experience.

Facebook
Twitter
LinkedIn
Pinterest

Table of Contents

Related posts