HTTP Explained: The HTTP Request Status Code Guide (Complete)


Today we’re going to dive deep into HTTP status
codes. This one’s going to be a real thriller, I’ll
tell you that much. We’re going to go deep into the nerd stuff. What are HTTP status codes, why they’re important,
how they affect your website, and how they affect your digital marketing strategy. We’re going to blow your hair back on this
one, I’ll tell you that much. Stay for the whole video, we’re going to do
a comprehensive overview of all of the most important HTTP status codes. My name’s Tommy Griffith with ClickMinded.com,
let’s get going. Alright folks, buckle in because we’re about
to blast off on this one. So let’s dive into HTTP status codes a little
bit, before we go really heavy into that, I just want to talk about some really high
level internet basics, and basics around web protocol. So I’ll just take 30 seconds and do a quick
refresher so that everyone’s on the same page. So some of the web protocol basics that affect
HTTP status codes, keep in mind, remember, the internet is really made up of two different
core things, and that’s clients and servers. So any time you open up your laptop, and you
click on your browser you’re accessing the internet through a web client, maybe it’s
Chrome, maybe it’s Firefox, maybe it’s Safari, or if you’re a godforsaken human being maybe
it’s Internet Explorer, but that’s a web client. Whenever you go to a website you’re making
a request to a web server. 216.58.214.78, as sexy as that sounds, Google.com
is actually much easier to remember. So every time you’re going to Google.com,
you’re actually making a request from the IP address from 216.58.214.78. Facebook, ClickMinded.com, a specific recipe
website, all of these have their own IP address. So whenever I access one of these sites I’m
accessing it via my client Google Chrome, and I’m accessing that web server. So every time you type Facebook.com into your
browser and hit enter, you the client are making a request to Facebook the server. So that’s the basic relationship, and you’re
often requesting a whole bunch of documents from that server, so maybe it’s HTML, maybe
it’s CSS, maybe it’s an image, a PDF file, whatever it is, you’re requesting a bunch
of files on that server. You make the request, and the server responds
to you, that’s the basic relationship. You make this request using what we call the
HTTP protocol. So protocols are really just standards that
everyone on the internet has agreed to, it’s no different than English, or Spanish, of
Chinese, it’s a language that we’ve all agreed to. So that’s the basic idea with this client
server relationship. You enter a website, you hit enter, you’re
making a request for files on a server, you make that request with the HTTP protocol,
that server responds to you with whatever you’re asking for. That’s the basics of what we’re talking about
today when we’re talking about HTTP status codes. You click another link on a website, what
happens? The same thing, you make a request and the
server responds. So every time you’re interacting on a website
this relationship continues in perpetuity, you make a request and the server responds. That’s happening every single time you’re
clicking a link. So there’s a ton of different protocols out
there, you know a lot of them. DNS is the domain name protocol, FTP is the
file transfer protocol, HTTP, hypertext transfer protocol. That’s going to be the one we’re talking about
today. People are really excited about cryptocurrency
right now because it’s potentially a new protocol for money. So there’s a lot of different protocols out
there, protocols are important, HTTP is the most popular, most used one, so we’re going
to be talking about more HTTP status codes today and how they affect you and your website. So we’re talking now about HTTP protocol status
codes. So a client makes a request to the server,
what happens next? Status codes let us know whether the request
was a success, a failure, or something in between. That’s what an HTTP status code is. Let’s take a look at the five core status
codes next. Okay, so let’s jump into each one of these
next. So the 100 block, these are informational
requests; the 200 block, those are successful requests; the 300 block are going to be for
redirects, redirection; 400 block will be for client errors; and 500 block will be for
server errors. So we’ll dive into each one of these next. So the 100 block, these are informational
requests. Basically the server hasn’t fully completed
the request yet and it’s still thinking, it’s kind of a transitional phase. You’re not going to see this much, but I just
wanted to briefly go over it if you do see it. So status code 100, that’d be to continue,
a 101 is for switching protocol, and a 103 is for checkpoints. Again, you’re not going to see this this much,
but if you do, that’s what it is; the server has not yet completed the request. 200 block requests. These are successful requests. Usually you’re going to see your status code
200 the most, there’s a couple of other ones; created, accepted, reset, or partial, but
in general a 200 request is great. That means everything happened like planned
and is usually what you’re going for. The 300 block are for redirects. So you requested an address, but you were
sent somewhere else, and there’s a bunch of different types of redirect; a 301 redirect,
a 302, a 304, 305, and 307. We’re going to talk about all of these a little
bit more, but any status code on the 300 block will be a redirection request. 400 block are for client errors. That means the page wasn’t found, something
is wrong with the request. So whatever is happening on the client side
is the issue. A 400 might be a bad request, a 401, unauthorized,
a 403, forbidden. We’re going to talk about the most important
ones a little bit later, but the basic idea here is that any status code that comes in
as a 400 is a client error. And finally the server errors in the 500 block. So that means the client made a good request,
but the server didn’t complete it. Something is wrong on the server side. I’m in Chrome, I request a website, I did
everything right on my end, but something’s wrong with the server. Like a 500, an internal server error, maybe
a 502, bad gateway, 503, service unavailable, 504, gateway timeout. Again, we’re going to dive into the most important
ones in a little bit, but the broad idea here is that 500 errors are server problems, not
client problems. Okay, so now I want to talk about some of
the most important status codes for digital marketing. The good ones, the bad ones, and the ones
you need to solve right away. Getting this technical stuff right is super
important, it’s absolutely devastating to put all this work into your site, or into
your digital marketing strategy only to have it all messed up by technical status code
issues. So getting these right is absolutely critical
to succeeding. So let’s talk about the good stuff first;
200s, the HTTP status code 200, this means a success, so this is what you want. A well functioning URL will respond with a
200 status code. Users, bots, everything else went perfect,
everything’s being requested, everything’s being returned, no problems at all. You want 200 requests, this is good news. Next up is a 301. This is a moved permanently request. So a 301 is also colloquially known as a 301
redirect. It should be used any time you’re permanently
replacing a URL for another URL. Users and bots are permanently moved to the
new URL, this new URL will usually replace the old URL in search results, and the old
URL will eventually disappear. Also, critically, and almost most importantly,
the link equity has passed from the old URL to the new URL. That means that if you’ve acquired a bunch
of links on an old URL and you 301 redirect that old URL to that new URL, you’re going
to get all that link equity, and that URL has the potential to replace the old URL in
search results. 301 redirects are usually the redirect of
choice any time you’re changing URLs. This is usually a great redirect to have. Now let’s talk about the 302 redirect, the
response found. 302 redirects in general are bad, you usually
don’t want to be implementing them. They’re similar to 301s in behavior, however
link equity is not passed, these are usually used for temporary situations. URLs are not replaced in search results. There’s just very few situations where you
would use this. Most of the time 301 redirects are a bad idea,
you almost always want to be using 301 redirects instead. 302 redirects are used for very temporary
situations where you’re maybe collecting data. AB tests, if you were manually doing an AB
test, and if you were bucketing users on your own, you might be implementing a 302 redirect. It’s very rare that you use them out in the
wild, and you usually want to stick with 301 redirects instead. Next is the 304, HTTP status code 304, not
modified. So the not modified is returned when a file
is unchanged on the server since it was last accessed. So browsers and bots, they make requests and
they have an “If-Modified-Since” header, if the file has not been modified since then,
the request won’t be fulfilled. This is kind of a crawl path optimization
response that you want to go for. Most small websites don’t need this, but if
you’re a massive site, this is actually a huge optimization. We had this at Airbnb, when we were getting
10s of millions of Google bot requests a day, but half of pages were unchanged. By returning a 304 not modified header you
can save some of your crawl budget, and allocate Google’s bots to go and find new pages that
it doesn’t know about yet. So this gets incrementally more valuable as
you have more crawl budget, as you have more pages, as you get more authoritative. The more comprehensive a website you have,
and the more stuff you need Google to find, the more this becomes valuable. If you’re under 1000 pages, or even under
10,000 pages, this is a little bit less valuable, but as you move up to the hundreds of thousands
and millions of pages, this becomes incrementally more valuable. Okay, next up is the 401 unauthorized, we’re
talking about client errors now. So a 401 unauthorized means your log in credentials
aren’t working, they’re not valid. The server doesn’t know who you are, and they’re
simply asking you to log in again. So this is usually if you have a membership
site, or you have some type of login credentials on a web application, returning a 401 when
something went wrong with the credentials is usually the right move. Now a 403 is similar, but it has a unique
difference. So a 403 status code is forbidden. The difference here, a 403 error is much more
explicit than a 401. A 403 is saying, okay, we know who you are,
you tried to log in, but we’re explicitly telling you that you’re not allowed to access
whatever you’re trying to access. An example might be, if I go to the bar and
I have an out of state ID, the bouncer says, “Hey, do you have a different ID actually? We can’t accept them here.” That’s a 401. Like, “Oh, sorry. Can you try again?” A 403 would be if I walked into that same
bar and they said, “No, no, no. We know you. You can’t come in here.” That’d be a 403. Explicitly telling me I can’t go in. Happens all the time, it’s a rough life I
lead. 404, HTTP status code 404, not found. Very common one, everyone knows this one. The URL being requested simply wasn’t found. It’s not true that 404s are all bad, this
is actually a misconception. It’s fine to serve a 404 if you simply don’t
have that page, or if a user misspells a URL, you don’t have to redirect every conceivable
URL, it’s totally fine to serve a 404. You can actually solve this by having a really
great 404 page. Sorry, the page you requested wasn’t found,
here’s some of our most popular links. Click, click, click, click, click. All authoritative pages that are 404s you
absolutely should replace. So you have a page, you have a URL, it used
to have a ton of links, or it has a ton of links and now it’s serving a 404, you want
to be 301 redirecting that to the most relevant page you have on your site. You don’t want to leave that as is. But general, the URL never existed, it was
mistyped, it’s totally fine to serve a 404 when there really isn’t a page there. This is a totally normal behavior, you’re
not going to get hurt by Google at all for this. Okay, so next up is the HTTP status code 410,
gone. So similar to a 404, but a little bit more
explicit. The gone response code means that the page
is truly gone, it’s no longer available on the server and no redirect was set up. Sometimes webmasters want to be very explicit
to Google and other search engines that a page is gone. This is a much more direct signal to Google
that a page is truly gone and never coming back, whereas if Google finds a 404, it may
actually keep returning, keep crawling for a little while longer and actually checking
and making sure that, “Hey, did you really mean that?” A 410 is very explicitly saying, “No, no,
no. This page is gone.” I don’t know a ton of reasons why you would
do this, it’s really in the nerd folklore area. I don’t really see too much reason to do that,
stick with the 404, you should be fine. Status code 4429, too many requests. Had a lot of problems with this in the past,
the basic idea here, again, a client side error, this is the 400 block. The user is sending too many requests in a
given amount of time, this is also colloquially known as rate limiting. So be very careful of rate limiting search
engines, if you have an engineering team that’s very aggressively trying to block bots and
do other things, rate limiting search engines is a bad idea. It’s very often that you will get rate limited. A lot of search engine ranking tools get rate
limited by Google, they make too many requests. DDOS, distributed denial of service attacks
are essentially rate limiting problems, and by blocking a certain IP address, or only
allowing a certain IP address to make so many requests over a certain period of time, that’s
kind of the first line of defense in blocking DDOS attacks. So 429 means, “Hey, you’re basically requesting
too much.” And it’s usually the client sending over too
much stuff. 500, internal server error. This one is a classic, this is just a problem
with your server. It’s kind of an ambiguous error, the server
doesn’t know exactly what’s wrong, but it knows something is wrong. This isn’t good, you want to fix this as soon
as possible. You usually have to contact your web host
to get this one sorted out, but it’s just a general problem with the server response,
and you see this a lot. You see a lot and you usually want to contact
your host as soon as possible. A 503, service unavailable. So, again, on the server side because it’s
in the 500 block. So this is similar to a 500 error, it means
the server is unavailable, but it usually means it’s an expected error. So a 500 error is usually an unexpected error
like, “Hey, something went wrong with the server, but we don’t know what happened.” With a 503 error, it’s usually an expected
error that the server intentionally sends. It usually means you didn’t pay your bill,
or you had more requests than your plan allows, something like that, but it’s like, “Hey,
something’s wrong, but we knew it was wrong.” It’s usually the same process, you just have
to contact your web host to get it sorted. The 504, the gateway timeout. So, again, 500 block, server error. The 504 means the server did not receive a
response fast enough from another server that it was making a request to. Again, same issue, you usually need to contact
your web host to get this one sorted, but what it usually means is that something else
broke that was reliant, or that you were relying, and that it broke, you timed out, and the
server wasn’t able to complete a full request. There’s your guide to HTTP status codes. Hope that’s helpful for you, your website,
and your digital marketing plan. So if that was useful, I hope it was helpful,
if that was useful and you learned something today, go ahead and click subscribe down below
to get even more digital marketing tactics and tips from us. If you’re watching on YouTube, go ahead and
leave a comment as well, we’d love to hear from you. What did you think of this? Did I miss any status code? How do you usually check your HTTP status
codes? Or if you’re having any problems, leave a
reply. I read every single one. Finally, if you want this exact checklist,
along with tools that we use to check our HTTP status codes and a comprehensive checklist
to fix all of these problems, we have a free downloadable for you. Just go ahead in the resources down below
and click that link to ClickMinded.com to get this as a downloadable freebie.

Leave a Reply

Your email address will not be published. Required fields are marked *