The Wayback Machine - https://web.archive.org/web/20241010133552/https://www.geeksforgeeks.org/explain-mean-of-404-not-found-http-response-code/
Open In App

Explain mean of 404 not found HTTP response code ?

Last Updated : 30 Nov, 2021
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

The browser and the site server have a conversation in the form of HTTP status codes. The server gives responses to the browser’s request in the form of a three-digit code known as HTTP status codes. The categorization of HTTP status codes is done in five sections which are listed below.

In this article, we will learn about the 404 error

404 Not Found: This response code occurs when the server cannot find the resources being requested by the client. This code can also be sent by the server instead of error 403 to hide the resources from the unauthorized client. It is one of the most famous response codes on the web.

Example: Let us try to access any invalid page as an example.

https://www.geeksforgeeks.org/designing/

 

Output:

Where we can see the status code?

  • Right-click on the page and do inspect the element.
  • Go to Networking Tab.
  • There you can see status codes.

Let’s go to Networking Tab and see the status code for Example 1.

Example 2: Let us try to access another page.

http://portal1.tmu.ac.in/Student/Grievances

Output:

Troubleshooting the error: We can follow the below steps to troubleshoot a 404 status code.

  • Check the URL again if it contains any error.
  • Refresh your web page by pressing the F5 key.
  • Clear the browser cache.
  • Modify the DNS (Domain Name System) server. Try it only if, the entire site gives you a 404 error.


Similar Reads

How to hide “Image not found” icon when source image is not found?
JavaScript and jQuery can be used to hide the "Image Not Found" icon when the image is not found. The basic idea is to set the display property of the image object to 'hidden' when an error arises. Let us consider the below HTML code which displays the GeeksforGeeks logo for demonstration purposes. These are the following approaches: Table of Conte
2 min read
How to send HTTP response code in PHP?
HTTP Response code: There are three approaches to accomplish the above requirement, depending on the version. For PHP versions 4.0: In order to send the HTTP response code, we need to assemble the response code. To achieve this, use header() function. The header() function contains a special use-case which can detect a HTTP response line and replac
2 min read
How to intercept response.send() / response.json() in Express JS
In the context of Express , "intercept" usually refers to the process of capturing or modifying a request or response in a middleware function before it reaches its final destination (e.g., a route handler) or before it is sent back to the client. In Express, intercepting response.send() or response.json() can be achieved by using middleware functi
3 min read
Different types of module used for performing HTTP Request and Response in Node.js
HTTP's requests and responses are the main fundamental block of the World Wide Web. There are many approaches to perform an HTTP request and Response in Node.js. Various open-source libraries are also available for performing any kind of HTTP request and Response. An HTTP request is meant to either retrieve data from a specified URI or to push data
3 min read
State the core components of an HTTP response ?
Have you ever thought about how the front-end of an application communicates with the backend to get data or perform certain operations? It is done through API Requests. API stands for Application Programming Interface. The communication between our client and the API is achieved using HTTP Request which is followed by a Response to the client. Bot
4 min read
Which HTTP response status codes result in then() and which in catch() ?
Axios is a popular JavaScript library for making HTTP requests. It uses promises to handle the response from the server, and provides a convenient then() and catch() syntax for working with the data or handling errors. Have you ever wondered which HTTP response status codes will cause axios to call the then() callback, and which will cause it to ca
4 min read
Ajax parsing response from http 409
Ajax is a powerful tool for building dynamic and interactive web applications. It allows developers to make asynchronous HTTP requests to a server, retrieve data, and update a webpage without the need to refresh the page. However, when making requests to a server, there are many possible HTTP responses that Ajax may encounter. One such response is
6 min read
How to Fix Git ‘remote: Repository not found’ Error?
When using Git to clone, push, or pull from a remote repository, you might encounter the error message: remote: Repository not found. This error indicates that Git is unable to locate the repository on the remote server. In this article, we will see how to troubleshoot and fix this issue. Understanding the ErrorThe remote: Repository not found erro
3 min read
Next JS File Conventions: not-found.js
Next.js not-found.js allows you to create a "Not Found" UI for your application which is rendered whenever the "notFound" function is thrown within a route segment. This file is designed to display a custom "Page Not Found" message when users navigate to non-existent routes within your application. Next JS Not Found Handling and Access Control:In N
4 min read
How to Resolve npm Command Not Found Error in Node.js
The npm Command Not Found error typically occurs when your system is unable to locate the npm (Node Package Manager) command. Node JS is a powerful platform for building server-side applications using JavaScript. Alongside Node JS, npm (Node Package Manager) is used commonly for managing dependencies and packages within NodeJS projects. We will dis
4 min read
Why are HTTP cookies used by Node.js for sending and receiving HTTP cookies?
The HTTP protocol is one of the most important protocols of the Application layer of the OSI model. The main use of this protocol is for sending hypertext information to the client to the server and server to the client to communicate on the World Wide Web. But, the HTTP protocol is a stateless protocol which means that this protocol cannot maintai
5 min read
Difference between HTTP/2 and HTTP/1.1
HTTP stands for hypertext transfer protocol & it is used in client-server communication. By using HTTP user sends the request to the server & the server sends the response to the user. There are several stages of development of HTTP but we will focus mainly on HTTP/1.1 which was created in 1997 & the new one is HTTP/2 which was created
3 min read
Will the 'error' event ever be emitted on 'http.IncomingMessage' in a node.js http.request ?
In this article, we will see how to handle the 'error' event that is emitted on 'http.IncomingMessage' in a node.js http.request. In Node.js, the 'http.IncomingMessage' object is used to represent the incoming HTTP request message. This object is a readable stream, and it can emit various events such as 'data', 'end', and 'error'. One of the events
3 min read
Handling 404 Error in Flask
Prerequisite: Creating simple application in Flask A 404 Error is showed whenever a page is not found. Maybe the owner changed its URL and forgot to change the link or maybe they deleted the page itself. Every site needs a Custom Error page to avoid the user to see the default Ugly Error page. GeeksforGeeks also has a customized error page. If we t
4 min read
History of The 404 Error
HTTP stands for HyperText Transfer Protocol. It is invented by Tim Berners. HyperText is the type of text which is specially coded with the help of some standard coding language called HyperText Markup Language (HTML). HTTP/2 is the successor version of HTTP, which was published on May 2015. HTTP/3 is the latest version of HTTP, which is published
2 min read
How to setup 404 page in angular routing ?
To set up a 404 page in the angular routing, we have to first create a component to display whenever a 404 error occurred. In the following approach, we will create a simple angular component called PagenotfoundComponent. Creating Component: Run the below command to create pagenotfound component. ng generate component pagenotfoundProject Structure:
2 min read
How to add a 404 Error Page in the Express ?
Express.js is a powerful framework for node.js. One of the main advantages of this framework is defining different routes or middleware to handle the client's different incoming requests. In this article, we will discuss how to add a 404 error page i.e not found using the express server. 404 is the status code which means not found in the server. I
1 min read
How to create custom 404 page in CodeIgniter ?
We often see the 404 error page while using websites. This error page will encounter only when we navigate to a broken link. In CodeIgniter, it is possible to create a custom 404 page to change the look of the 404 page. So in this article, we will look into how to create the custom 404 error page. In order to create a custom 404 error page, we need
2 min read
Create a 404 page using HTML and CSS
In this article, we will see how to create a 404 page using HTML and CSS. A user when trying to access a URL that doesn't exist or has been moved. Instead of presenting a generic error message a custom 404 page can enhance the user experience and even add a touch of creativity to your website. ApproachCreate a basic HTML structure with a standard t
2 min read
How to setup 404 page in React Routing ?
Every Website needs a 404 page if the URL does not exist or the URL might have been changed. To set up a 404 page in the angular routing, we have to first create a component to display whenever a 404 error occurs. In the following approach, we will create a simple react component called PagenotfoundComponent.  Prerequisites:NPM & Node JSReact J
2 min read
How to Redirect 404 errors to a page in Express.js ?
Express Js is a web application framework based on Node.js web server functionality that helps us to create web servers with lesser complexity and in a well-organized manner. Express provides routing services that help us in creating application endpoints that respond based on the HTTP request method (GET, POST, DELETE, etc) and the requested route
2 min read
How to Customize the WordPress 404 Error Page?
A 404 error page is what your visitors see when they try to access a page that doesn't exist on your website. A well-designed 404 error page can enhance user experience and even help retain visitors by guiding them back to the main content of your site. In this article, we will walk you through the steps to customize the 404 error page in WordPress
5 min read
How to Create 404 Error Page in Bootstrap ?
Every website encounters errors sometimes, so it becomes important to show these errors in a presentable manner to the users. Creating a custom 404 error page using Bootstrap 5 can enhance the user experience when visitors encounter a page that doesn’t exist. Below are the types of 404 Error Page we can create in Bootstrap: Table of Content Simple
2 min read
How To Redirect To Home Page instead Of Displaying 404 Page in Gatsby?
In Gatsby when a user navigates to a non-existent page, they typically see a 404 error page. However, there may be situations where you want to redirect users to the home page (or another specified page) instead of showing the 404 error page. This can be useful for improving the user experience or handling specific routing needs. In this article, w
3 min read
How To Create 404 Pages in Tailwind CSS?
Creating a 404 error page using Tailwind CSS is simple and effective. Tailwind CSS allows you to quickly style and layout your page using its utility-first CSS framework. In this article, we'll see the process of designing a custom 404 page with an engaging design to keep users informed and on track when they land on a page that page doesn’t exist.
2 min read
How to return an error if response not received in 1 minute in Node.js ?
In Node.js, sometimes due to some errors, a response takes more time than usual and in this case, instead of waiting for an uncertain period, we can return an error or some message if the response is not received in 1 minute.  Problem: Suppose there is a function 'helloGeeks' which in response returns a promise, then the returns value is logged by
2 min read
Explain HTTP authentication
We are in big doors to the digital era where comfort is the main driver. Enjoying all the convenience right from ordering merchandise and paying bills to get services while sitting on the couch. This is how we developed the internet to work for us. Here, authentication comes in and every web resource wants to know who you are because your details a
5 min read
Explain HTTP Strict Transport Security
HTTP stands for Hypertext Transfer Protocol. This protocol is used for communication in web requests. HTTPS on the other hand stands for Hypertext Transfer Protocol Secure. While HTTP doesn't concerned about encrypting data that is getting transmitted in HTTP Requests and is generally prone to Man-In-The-Middle (MiTM) attacks. An adversary in the n
3 min read
Explain Different Types of HTTP Request
Hypertext Transfer Protocol (HTTP) defines a variety of request methods to describe what action is to be done on a certain resource. The most often used HTTP request methods are GET, POST, PUT, PATCH, and DELETE. Let's understand the use cases of HTTP requests: GET: A GET request reads or retrieves data from a web server. If the data is correctly c
5 min read
Explain HTTP Request in Backbone.js
Backbone.js is a compact library used to organize JavaScript code. An MVC/MV* framework is another term for it. If MVC is unfamiliar to you, it is just a technique for designing user interfaces. The creation of a program's user interface is made considerably easier by JavaScript functions. BackboneJS provides a variety of building elements to aid d
4 min read
Article Tags :