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.
How do you fix a 404 error?
If the page is missing you’ll have to ask your web developer to look through the logs, or database and see if he or she can bring the page back. One nifty way to search for old content is to look on the site Archive.org to find an older version of your site. Archive.org “caches” (meaning stores old versions) of your content. Therefore, using that site you might be able to recover some lost content. But ultimately if you want it back up you’ll need to ask your developer.
One need trick, if you’re using a WordPress site, is to install the Redirection Plugin. This plugin will record a log of all your 404 errors, and it will even try to automatically fix them when they break. (Shameless plug: If you’d like to learn more about WordPress development I’d suggest my online WordPress course.)
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 404 pages? Here are some of our favorites 404 examples: