Questions tagged [http-status-code-404]

The HTTP status code 404 or "Not Found" indicates the server could not find the requested file or resource.

A 404 often means that the URL requested is invalid or points to a file that no longer exists (e.g. has been moved or deleted). It can also mean that web service method or other similar resource does not exist.

Many web servers can be configured to display a specific error page when this occurs which allows users to continue navigating in a manner consistent with the design of the website.

See RFC2616 for reference.

Microsoft's Internet Information Services (IIS) versions 7, 7.5, and 8.0 provide additional sub-status values for various types of 404 response statuses. These are not recognized as standard status codes, but may be relevant for IIS-hosted applications.

Microsoft Sub-Status Codes:

404.0 – Not found.
404.1 – Site Not Found.
404.2 – ISAPI or CGI restriction.
404.3 – MIME type restriction.
404.4 – No handler configured.
404.5 – Denied by request filtering configuration.
404.6 – Verb denied.
404.7 – File extension denied.
404.8 – Hidden namespace.
404.9 – File attribute hidden.
404.10 – Request header too long.
404.11 – Request contains double escape sequence.
404.12 – Request contains high-bit characters.
404.13 – Content length too large.
404.14 – Request URL too long.
404.15 – Query string too long.
404.16 – DAV request sent to the static file handler.
404.17 – Dynamic content mapped to the static file handler via a wildcard MIME mapping.
404.18 – Query string sequence denied.
404.19 – Denied by filtering rule.
404.20 – Too Many URL Segments.

6856 questions
109
votes
8 answers

Google Analytics - Failed to load resource: http://www.google-analytics.com/ga.js

I've been noticing this error on Chrome's console for a while now: I modified Google's script so that it logs the error, because it uses try{} catch{}, and this is what I got: I haven't noticed considerable changes in the stats, it's always in ups…
Nahuel
  • 3,555
  • 4
  • 21
  • 28
109
votes
28 answers

Django Static files 404

I can't get my static files to come up. I've tried various settings and directory configurations and so on, but they just turn up as 404s. I have debug_toolbar installed so know that STATIC_URL is reaching my request context. Directory structure…
KindOfGuy
  • 3,081
  • 5
  • 31
  • 47
106
votes
2 answers

Image Get Requests with AngularJS

I am storing the the source string of an image to be rendered in HTML in the AngularJS controller, however it yields a 404 before the Angular controller is initialized. Here is the HTML:
ssb
  • 7,422
  • 10
  • 36
  • 61
102
votes
34 answers

HTTP 404 Page Not Found in Web Api hosted in IIS 7.5

I have a Web Api application. It works perfectly well when I tested it using the VS 2010 debugging dev server. But I now deployed it to IIS 7.5 and I am getting a HTTP 404 error when trying to access the application. Here is my web.config
Armand
  • 9,847
  • 9
  • 42
  • 75
102
votes
10 answers

How can I catch a 404?

I have the following code: HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.Method = "HEAD"; request.Credentials = MyCredentialCache; try { request.GetResponse(); } catch { } How can I catch a specific 404 error? The…
JL.
  • 78,954
  • 126
  • 311
  • 459
100
votes
7 answers

Enabling SSL with XAMPP

I've been following this guide as much as I could http://robsnotebook.com/xampp-ssl-encrypt-passwords . However whenever I browse to a page starting with https the apache server replies 404 Object Not Found. What setting I am missing? Thanks for any…
ColacX
  • 3,928
  • 6
  • 34
  • 36
97
votes
4 answers

How to return 404 response status in Spring Boot @ResponseBody - method return type is Response?

I'm using Spring Boot with @ResponseBody based approach like the following: @RequestMapping(value = VIDEO_DATA_PATH, method = RequestMethod.GET) public @ResponseBody Response getData(@PathVariable(ID_PARAMETER) long id, HttpServletResponse res) { …
catch23
  • 17,519
  • 42
  • 144
  • 217
93
votes
6 answers

What is the proper way to send an HTTP 404 response from an ASP.NET MVC action?

If given the route: {FeedName}/{ItemPermalink} ex: /Blog/Hello-World If the item doesn't exist, I want to return a 404. What is the right way to do this in ASP.NET MVC?
Daniel Schaffer
  • 56,753
  • 31
  • 116
  • 165
90
votes
8 answers

how to fix 404 warnings for images during karma unit testing

I'm unit testing one of my directives (angularjs) using grunt/karma/phantomjs/jasmine. My tests run fine describe('bar foo', function () { beforeEach(inject(function ($rootScope, $compile) { elm = angular.element('
84
votes
2 answers

Tomcat 404 error: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists

I was following the tutorial on o7planning and got stuck at step 6: http://o7planning.org/en/10169/java-servlet-tutorial It's just a simple project that show HelloWorld but for some reason I keep getting 404 error. Detail: However the Tomcat…
Lê Quang Bảo
  • 2,670
  • 2
  • 27
  • 40
82
votes
16 answers

Netlify renders 404 on page refresh (using React and react-router)

I have deployed my site with Netlify, and I’m having trouble with the routing. Here is my website: https://redux-co.netlify.com/ And my GitHub repo: https://github.com/jenna-m/redux-co Specifically, if a user navigates to any page besides the home…
Jenna
  • 1,159
  • 2
  • 10
  • 16
82
votes
7 answers

ASP.NET Custom 404 Returning 200 OK Instead of 404 Not Found

After trying to setup my site for Google Webmaster Tools I found that my Custom ASP.NET 404 page was not returning the 404 status code. It displayed the correct custom page and told the browser that everything is OK. This is consider a soft 404 or…
Bobby Cannon
  • 6,665
  • 8
  • 33
  • 46
78
votes
3 answers

TOMCAT - HTTP Status 404

I set up my server in eclipse and when I run it the console prints: mai 02, 2013 4:05:13 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production…
GiGamma
  • 894
  • 1
  • 9
  • 16
77
votes
5 answers

How to check if a URL exists or returns 404 with Java?

String urlString = "http://www.nbc.com/Heroes/novels/downloads/Heroes_novel_001.pdf"; URL url = new URL(urlString); if(/* Url does not return 404 */) { System.out.println("exists"); } else { System.out.println("does not exists"); } urlString…
Sergio del Amo
  • 76,835
  • 68
  • 152
  • 179
75
votes
13 answers

urlencoded Forward slash is breaking URL

About the system I have URLs of this format in my project:- http://project_name/browse_by_exam/type/tutor_search/keyword/class/new_search/1/search_exam/0/search_subject/0 Where keyword/class pair means search with "class" keyword. I have a common…
Sandeepan Nath
  • 9,966
  • 17
  • 86
  • 144