47

It's occurred to me that it would be useful to have a URL that would always return a 500, for the sake of testing client code that handles getting bad responses. And I can think of other projects that would benefit from URLs that would always return 404s, redirects, etc. Does anyone know of a free website that offers this?

Mark
  • 1,746
  • 2
  • 18
  • 19
  • I don't know of any off hand, but that's a really great idea. Now you'll probably see a few hundred of them pop up :) – Eric Jul 14 '14 at 12:15

4 Answers4

56

I believe http://httpstat.us/ can do that as well.

Greg Humphreys
  • 968
  • 1
  • 7
  • 11
11

In case you can't easily change the path, but can configure the host easily: http://218.returnco.de/whatever and http://returnco.de:218/whatever

(Disclosure: I run this small service)

mgaert
  • 2,338
  • 21
  • 27
  • That's a great service, but the ssl certificate seems to be expired – Andrew Slabko Apr 10 '18 at 11:32
  • 1
    Well, it's not exactly expired, but issued to some other DNS name of that virtual machine. As the page says: "Don't look too closely at the certificate." It's kind of hard to make a business model out of error codes ... – mgaert Apr 12 '18 at 08:44
  • 2
    Moved the cert to "Let's Encrypt" a while ago, shows up green now, unless I botched the renewal automation. – mgaert Dec 05 '19 at 15:24
10

Here is a site that can return any status code:

http://the-internet.herokuapp.com/status_codes

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685
5

There's also https://httpbin.org/. You can run this locally:

docker pull kennethreitz/httpbin
docker run -p 80:80 kennethreitz/httpbin

See https://github.com/postmanlabs/httpbin for more details.

parsley72
  • 8,449
  • 8
  • 65
  • 98