Okay, quick lesson. When you go to a link on the web, or visit a site on the web, you’re telling a server somewhere to send you a page. A server is basically the same thing as a site. For example, when you go to twitter.com you’re telling the Twitter server that you want to see their home page.
Every time you talk to a server, it’s called a request. The server then sends you back a page as a response. That whole system of communication is called HTTP (which is why the full URL is http://twitter.com). It’s like this:
- You: I want the page at twitter.com
- Twitter’s Server: OK! Got it for you.
- You: I want the page at twitter.com/person-who-doesnt-exist
- Twitter’s Server: Uhhhh, what? I don’t know who that is. Sorry there’s no page for you.
Each response is sent to you with a status code. Status codes are three numbers like 200, 404, 500, and 301. Normally you don’t see the status code, because it’s something your browser (Chrome, Firefox, Internet Explorer *shudder*, or whatever) hides from you.
404 — means not found. Basically, you’re looking for a page but the web application you’re talking to has no idea what you’re talking about. This is almost always what happens when you try to load some random page that doesn’t exist, like www.google.com/sdflkjasdflwjks
What are some other important status codes?
There are literally dozens of status codes, but only a handful of really important ones:
200 — means OK, you got your page and everything’s good. Like when you visit www.google.com.
301 — means permanent redirect. This happens a lot without you realizing it. For example, when you go to facebook.com, you’re actually redirected to www.facebook.com, so your first request gets a 301 response telling your browser to www.facebook.com, which then gives your browser a 200 OK Status.
401 — means unauthorized. That happens when you try to load a page that exists, but you’re not allowed to. Like if it’s an admin page that you shouldn’t be able to access.
500 — means internal server error. Basically the application itself fucked up somehow. This is usually code error somewhere. They often look the same to you as a user, but there’s a major difference from the developers perspective.
There’s tons of others, but the basic rule is:
- 1xx means informational (I’ve never actually seen this though, so don’t worry about what it means)
- 2xx means success
- 3xx means redirection
- 4xx means a browser error — like you’re trying to load a page that doesn’t exist or you shouldn’t access. Basically it’s your fault usually.
- 5xx means a server error — like the developer fucked up somehow.
Don’t worry, you’re not expected to memorize any of them. There’s a whole list of them all and what they mean on Wikipedia (http://en.wikipedia.org/wiki/List_of_HTTP_status_codes) in case you’re interested. Again, don’t try to memorize them. Did all of this make sense? Ok, good. Otherwise, post a question below.
P.S. Want to see some awesome 404 pages? Here are some of our favorites: