What Is a 404 Status Code? (2024)

A 404 error occurs when the origin server did not find a current representation for the target resource, or it is not willing to disclose that one exists.

An HTTP 404 error happens when the server can’t find a resource — like a page — at a certain URL. Error 404 can impact the users’ ability to view web content and navigate a website.

For website owners, 404 errors are an issue to resolve. This page will cover everything there is to know about 404 errors, including what they are and how to fix them.

What is a 404 error?

A 404 error occurs when the origin server did not find a current representation for the target resource, or it is not willing to disclose that one exists.

A 404 status code does not indicate whether this lack of representation is temporary or permanent; the410 Gonestatus code is preferred over 404 if the origin server knows, presumably through some configurable means, that the condition is likely to be permanent.

A 404 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls.

404 code references

Rails HTTP Status Symbol:not_found

Go HTTP Status Constanthttp.StatusNotFound

Symfony HTTP Status ConstantResponse::HTTP_NOT_FOUND

Python2 HTTP Status Constanthttplib.NOT_FOUND

Python3+ HTTP Status Constanthttp.client.NOT_FOUND

Python3.5+ HTTP Status Constanthttp.HTTPStatus.NOT_FOUND

.NET HttpStatusCode.NotFound

Rust http::StatusCode::NOT_FOUND

Java java.net.HttpURLConnection.HTTP_NOT_FOUND

Apache HttpComponents Core org.apache.hc.core5.http.HttpStatus.SC_NOT_FOUND

Angular @angular/common/http/HttpStatusCode.NotFound

404 status code example

Here is an example of a request and response that could result in a 404 status code:

Request

GET https://example.com/non-existent-resource HTTP/1.1
Host: example.com

Response

HTTP/1.1 404 Not Found
Date: Wed, 16 Mar 2023 12:00:00 GMT
Server: nginx
Content-Type: text/plain;charset=UTF-8
Content-Length: 19

The resource was not found

In this example, the client is sending a GET request to access a resource at https://example.com/non-existent-resource. However, this resource does not exist on the server.

What does an error 404 mean?

The server responds with a 404 Not Found status code, which indicates that the requested resource could not be found. The response also includes a message body with a plain text message that provides additional information about the error.

The server also includes several headers in the response, such as Date, Server, Content-Type, and Content-Length, which provide additional information about the response.

The 404 status code is a common HTTP status code that occurs if:

  • The requested resource was not found on the server
  • The resource has been deleted, moved, or renamed
  • The client has entered an incorrect URL

What to do if you find an error code 404

If you run into a 404 error code while browsing, here are some steps you can take to figure out and remedy the issue:

  • Make sure the URL is correct: Check that the URL is correct and matches the resource you’re looking for. Correct any typos that could lead to an error.
  • Use a different device:If you’re getting an error on one device and not another, it could be an issue with your browser. Clear your history and cache to see if that helps with the error.
  • Refresh the page:Some errors are just a glitch that you can fix with a refresh.
  • Search for the page online:If the owner moved the page to a new address, you may be able to find it by searching for it online.
  • Contact the website:If you can’t find the source of the error, contact the website to let them know that one of their pages is causing a 404.

Why should you fix 404 errors?

If you’re the website owner, you want to fix 404 errors as soon as possible to prevent issues with users viewing your website. Having multiple broken links impacts user experience on your site, causing viewers to click away.

404 errors can also lead to issues with crawling and indexing, which hurts your search engine optimization (SEO). A high bounce rate from users leaving your site quickly also contributes to lower rankings. Eventually, it will be harder to get people back to your site, which could affect your conversions online.

How to fix an error 404 status on your website

So, what do you do if you’re the website owner, and you have 404 status errors popping up? Here are some ways to fix a 404 status code:

  • Refresh the server logs: Check the server logs to see if there are any errors or issues that could be causing the 404 error. Look for any errors related to the resource that the client is trying to access.
  • Check the server configuration: Check the server configuration to ensure that the resource is configured correctly. Make sure that the resource exists and is mapped to the correct location on the server.
  • Update the permissions: Check the permissions for the resource to ensure that the client has permission to access it. If the permissions are incorrect, update them to allow access to the resource.
  • Implement a redirect: If the requested resource has been moved or renamed, you can implement a redirect to the new location. This allows the client to access the resource using the new URL.
  • Implement a custom 404 page: If the requested resource cannot be found, you can implement a custom 404 page to provide the client with helpful information about what went wrong and how to proceed.
  • Update links: If the resource has been moved or renamed, update any links that point to the old location to point to the new location. This will help prevent future 404 errors for other clients who may be accessing the same resource.

FAQs about 404 status codes

Learn more about 404 not found errors in our FAQ:

What is a 404 page?

A 404 page is a web page that is displayed to a user when they try to access a resource that cannot be found on a server. This can occur if the URL that the user entered is incorrect or if the resource has been moved, deleted, or renamed:

What Is a 404 Status Code? (1)

A 404 page is typically designed to provide helpful information to the user and guide them towards finding the resource they are looking for. The page may include a message explaining that the resource could not be found, suggestions for what the user can do next, links to other pages on the website, or a search box that the user can use to find the desired content:

What Is a 404 Status Code? (2)

Should you create a custom 404 page?

Customizing the 404 page on a website is a good practice, as it can help improve the user experience and prevent users from leaving the site in frustration. A well-designed 404 page can also help maintain the credibility and professionalism of a website.

In some cases, a 404 page may also include a link to report the issue to the website’s administrator or support team. This can help the website owner identify and fix any issues that may be causing the 404 error, and ensure that users are able to access the content they are looking for.

Do 404 status codes affect SEO?

Yes, 404 errors can affect SEO. They can result in a negative user experience and impact the website’s search engine rankings through the following:

  • Loss of traffic: If a user encounters a 404 error when trying to access a page on a website, they may leave the site and search for the content elsewhere. This can result in a loss of traffic and potential customers for the website.
  • Broken links: If a website has a lot of 404 errors, it can signal to search engines that the site is not well-maintained and has a lot of broken links. This can negatively impact the site’s search engine rankings.
  • Decreased crawl efficiency: Search engine crawlers will continue to crawl a site even if they encounter 404 errors. This can decrease the crawl efficiency and result in a slower crawl rate for the site.
  • Negative impact on user experience: A website with a lot of 404 errors can negatively impact the user experience, as it can be frustrating for users who are trying to access content on the site. This can result in a higher bounce rate and lower engagement metrics, which can in turn negatively impact the site’s search engine rankings.

To mitigate the impact of 404 errors on SEO, it’s important to ensure that any broken links are fixed as soon as possible, and that users are redirected to relevant content if a page is no longer available. Additionally, implementing a custom 404 page can help guide users to other relevant content on the site and improve the overall user experience.

How do you find 404 errors on your site?

The easiest way to find 404 errors on your site is by doing a site audit with some sort of crawler tool. Screaming Frog, for example, lets you run a complete site audit and filter for HTTP 404 errors on your site.

Google Search Console also offers the same feature for account holders. OnGoogle Search Console, log in, click Coverage, and head to the Excluded tab. You’ll have a complete list of 404 errors on your website.

Additional resources

  • Learn about web development
  • Learn about SEO
  • Web development services from WebFX
  • SEO services from WebFX
  • MDN Web Docs
  • W3Schools

Return to List of HTTP Status Codes

What Is a 404 Status Code? (2024)
Top Articles
Strategies for Recession-Proof Fundraising - TravelPledge News
Understanding the Maffetone Method | 13 Years Experience
Sdn Md 2023-2024
Is Paige Vanzant Related To Ronnie Van Zant
Phone Number For Walmart Automotive Department
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Encore Atlanta Cheer Competition
Publix 147 Coral Way
414-290-5379
Lantana Blocc Compton Crips
Full Range 10 Bar Selection Box
Lima Crime Stoppers
Breakroom Bw
Flower Mound Clavicle Trauma
Christina Khalil Forum
Munich residents spend the most online for food
Define Percosivism
Uky Linkblue Login
Tinker Repo
Diakimeko Leaks
Jenna Ortega’s Height, Age, Net Worth & Biography
27 Modern Dining Room Ideas You'll Want to Try ASAP
Bayard Martensen
Scott Surratt Salary
Ts Modesto
Barbie Showtimes Near Lucas Cinemas Albertville
Helpers Needed At Once Bug Fables
Wheeling Matinee Results
Publix Daily Soup Menu
Play 1v1 LOL 66 EZ → UNBLOCKED on 66games.io
Bt33Nhn
Most popular Indian web series of 2022 (so far) as per IMDb: Rocket Boys, Panchayat, Mai in top 10
Rocketpult Infinite Fuel
Domina Scarlett Ct
Gold Nugget at the Golden Nugget
Acadis Portal Missouri
Bismarck Mandan Mugshots
Cdcs Rochester
9 oplossingen voor het laptoptouchpad dat niet werkt in Windows - TWCB (NL)
Isabella Duan Ahn Stanford
Lyndie Irons And Pat Tenore
Avance Primary Care Morrisville
Costco Gas Foster City
Patricia And Aaron Toro
705 Us 74 Bus Rockingham Nc
Sacramentocraiglist
UNC Charlotte Admission Requirements
Food and Water Safety During Power Outages and Floods
Germany’s intensely private and immensely wealthy Reimann family
Die 10 wichtigsten Sehenswürdigkeiten in NYC, die Sie kennen sollten
Latest Posts
Article information

Author: Saturnina Altenwerth DVM

Last Updated:

Views: 6578

Rating: 4.3 / 5 (44 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Saturnina Altenwerth DVM

Birthday: 1992-08-21

Address: Apt. 237 662 Haag Mills, East Verenaport, MO 57071-5493

Phone: +331850833384

Job: District Real-Estate Architect

Hobby: Skateboarding, Taxidermy, Air sports, Painting, Knife making, Letterboxing, Inline skating

Introduction: My name is Saturnina Altenwerth DVM, I am a witty, perfect, combative, beautiful, determined, fancy, determined person who loves writing and wants to share my knowledge and understanding with you.