August 14, 2024
Human Friend Digital Podcast

Acronym Soup – HTTP Response Codes 404, 502, 301

Acronym Soup - HTTP Response Codes 404, 502, 301
in this episode

Understanding the Hidden Language of HTTP Errors

This week on the Human Friend Digital Podcast, Acronym Soup Edition, Jacob and Jeffrey unpack something we’ve all encountered but few of us understand: HTTP error codes. We’ve all seen that dreaded “404 page not found,” but what does it really mean? And what about all those other cryptic numbers that sometimes flash across our screens?

Jacob kicks things off by explaining that HTTP error codes are like the language of the internet’s back-end, letting us know when things go awry. These codes are grouped by hundreds—200’s mean everything’s working smoothly, 300’s involve redirects, 400’s signal client errors like our infamous 404, and 500’s point to server-side issues.

It’s a conversation that explains those frustrating moments when a webpage doesn’t load and gives us a glimpse into the complex world of website management. Tune in to learn how these error codes affect your online experience and what they really mean behind the scenes.

View Episode Transcript

Jacob:

Hey, Jeff. Why don’t you kick today’s episode off?

Jeffrey:

Absolutely. So today is Acronym Soup, Episode 3, where we will be talking about HTTP error codes, or response codes.

So Jacob, we’ve all been to a website that gives us a 404 error “page not found,” or whatever… I don’t remember if that’s exactly what it says.

Jacob:

That’s usually what it says.

Jeffrey:

Okay, “page not found.” So, I’d like to discuss the various codes that people encounter and what they mean. 

Jacob: 

Right. So, most of the time you’re going to have all these different codes– some of them are unseen, but they’re talked about, and some of them are seen, and they kind of look a little confusing, like “what’s going on?” So, 404, let’s start there: Now you’re gonna notice this number starts in the four hundreds, and that’s because there’s actually 100, 200, 300, 400 and 500 response codes. And there each one is a set. 

Jeffrey:

So like, 245 would be in the 200’s. I don’t know if that exists, but…

Jacob:

No, they don’t exist. There’s only a handful that exist in each hundred group. And so we’re just going to talk about the most common ones people come across. So when you get to 400’s, that’s basically your content management system and server delivering stuff, is having a bit of a struggle getting you the thing that you want.

And usually a 404 error is almost always down to the URL was typed  incorrectly, or maybe a page moved on the site and they didn’t set up a 301 redirect. So that’s another one that people talk about. But the most common ones that you will see are 404’s and that means that they couldn’t find the correct page that you were looking for.

Jeffrey:

Okay, so that could be a user error, or it could be that the website no longer exists as you typed it in?

Jacob:

The web page on the website no longer exists, correct. And things get moved around, and that happens from time to time. What if you wanted to shorten a URL, and your website server did not compensate for that shortening, and didn’t set up a redirect, it just… 

You know, like let’s say you have a really, really long blog post title, and that makes you a really, really long blog post URL, and you want to change it to something like, that’s two words. But you do that after the fact, it’s been up on the website for a while, it’s been posted, and you change that. Usually website servers automatically now set up a little redirect, but sometimes they don’t. Sometimes it doesn’t work out, or maybe there’s another page that it gets redirected to by accident. Just things happen. Then you’ll get a 404 error. So, that’s one of the nerdy ones. 

The other ones that people will actually see is in the 500’s groups. And that’s usually a 502, or maybe a 501, or a 504. But anyways, all the 500’s is when the actual machine that has the computer is wiggin-out and like, failing. 

Jeffrey:

The server itself?

Jacob:

Yeah, the server itself is failing. And a server really is just a computer with a website program running on it, and then you’re going there and hanging out on the box for a little bit.

But, when you get 500 errors, that means that the server, or the content distribution network, CDN– and we can do that in another episode– which is like a copy of your server in the world to speed up download times, but that one will actually be broken. 

So, you got your 400’s, you got your 500’s, and then the other ones that you’ll hear about, that you might see in reports from time to time with web developers or stuff, is 301 redirects. That’s probably one of the most common ones that’s talked about, but no one sees the word 301 pop up on their screens.

Jeffrey:

Right, exactly.

Jacob:

So what it is, is you have a file that is baked into your server that has a list– and there’s usually there’s a plug-in or an app that helps you write things to this list– but the list is like “old URL > 301 > new URL.” So that’s like if you move a page and you want to change it.

Or, let’s say you have a page about, I don’t know, cocktail photography on your website, and you’re going to get rid of that, and you’re going to actually get cocktails and drinks and all this other stuff on one thing called “drink photography,” and you want to get rid of the cocktail photography page: You can set up a 301 redirect, so if you type in cocktail photography, what will load is the drink photography page. It will send them over there immediately.

Jeffrey:

Okay. So, you don’t have to get rid of that original URL, you can just keep the URL and then tell it to redirect to another one.

Jacob:

Exactly, so that way you don’t end up…

Jeffrey:

Like you’re coding this on the backend, you’re telling it, “okay, if someone types this in, or someone gets to this page, 301 redirect them?”

Jacob:

Yeah, exactly. And so you’ll hear that a lot, where people will throw around the word 301 because they know they’re moving it, they know they’re getting rid of a page, they set up a 301, it takes it to the new page.

Jeffrey:

Right. So it’s a little shortcut, you don’t have to restructure everything. You can just say “here, just, if they go here, send them there.”

Jacob:

Yeah, and that happens all the time, because you’re gonna want to get rid of something. Let’s say you had someone at your company that did X service, and they left, and you downsized your company, and you lost like five pages, rather than people getting 404s coming back to your site, you can set up 301s and then send them to pages that do exist on your site. 

Now the other code– now getting into the other one– is 200, and that’s a good one. So actually when you go to a web page and it loads fine and you don’t notice anything, on the back end, the server gave a response code of 200. So…

Jeffrey:

Yeah, I’m reading right here. It says the 2xx, like the 200 class, is “the request was successfully received, understood, and accepted.”

Jacob:

There you go. That’s what it is. So a lot of times when someone’s doing a website audit, they might have this spreadsheet, and in one column of it, and I do this from time to time, I’ll have a column, and I’ll have Google Sheets go out to that page and grab the server response code that it gets from the page, and put it in a column on my sheet.

Jeffrey:

And then you can see what’s functioning on your website and what’s malfunctioning?

Jacob:

Right, exactly. And then you’ll know things that will show up a 500… if 500 starts showing up, you know your server’s having a problem immediately.

Jeffrey:

Right, which is not necessarily on you. 

Jacob:

No that means though, that means the hosting platform that you’re using is like, “oh, I’m having a hard day.” 

But you can get 404s, but it won’t show 301s in those reports, but it’s a great way to check your health. So there you go, the 200’s are the way to know that your website’s working, basically. And it usually only shows up in audits when it’s going page by page by page. So you’ll see 200 means okay, if they detect a 301, it means a redirect’s happening. And there’s a couple different types of 300’s: there’s like 301’s, 302’s… They mean slightly different things and they’re for different applications, but we don’t have to go into it today. 

Jeffrey:

Yeah it says the whole 300 class is “further action needs to be taken in order to complete the request.” So that could be like, a redirect is a further action, but there are other examples, is what you’re saying? 

Jacob:

Yeah. And so I would like to just extend one more error that’s pretty common that will get people is redirect loops will happen. Like, you go to a page and you watch the browser bar, you might see the URL switching around a lot, or your website browser is actually going to wig-out and a white screen is going to show up and it’s going to be like “too many redirects” or something like that is going to appear on your screen.

Jeffrey:

Oh, I’ve seen that before.

Jacob:

That’s when the website owner, or the developer of the website, has made a mistake in the way that redirects are occurring. And what happens…

Jeffrey:

It’s redirecting to a redirect, which then redirects you back?

Jacob:

And that can happen. Usually that happens in the beginning when like, a website launches. And, there, there’s… like you have SSL certificates, which is another acronym we can go over another day.

Jeffrey:

Yeah. I think we’ve got that planned.

Jacob:

So you have like HTTP, HTTPS with like the little lock security. And a lot of times when a website is going live, if the developer configured it wrong, that switch over between those things going, will create a redirect loop where it’s going to be like, “I’m going to go to the home page of this URL, I’m going to go to the home page of this URL, I’m going to go to the home page of this URL…” and then it goes into a death spiral.

But you can make it by accident too. If you had like the drink photography thing: Like, let’s say you had a page called “Drinks,” and “Drinks” is supposed to redirect to “Cocktail Photography,” and then one day you get rid of the “Cocktail Photography” and want to go back to “Drinks,” and then you write a redirect that says, “Go to Drinks Photography,” where the page is supposed to be now, and a lot of times websites, like even WordPress, will let you edit a page in preview mode of a page that has a redirect, and you won’t even know it, until, until you say publish and then you go try to view it when you’re not logged in. And then the redirect will kick in.

Jeffrey:

On the front end

Jacob:

Yeah, and then the whole page just goes in a loop of a death spiral.

Jeffrey:

Then you have to go back on the back end and fix your…

Jacob:

So, those are the most common ones: 200’s, 301’s, 404’s, 502’s bad gateway… and then that’s everything that’s going on there.

Jeffrey:

Okay, one last question: okay, a 404 versus a DNS not found?

Jacob:

Oh, if you get that as a server response back. So, 404 would be handled on the content management side of it. So, that is, a page is moved around, like the website still loads.

So, a DNS, domain name server issue, is when something is configured wrong on that side of the URL. So, you know how we have like the URL of our site is humanfriend.digital. I have all that managed on Amazon’s Route 53– or you can have GoDaddy, or you can have all these other services– but there’s a space in there for putting in special information that says “if someone types in this URL, human friend.digital, take them to my hosting platform, WP engine, and render the site that is located at this specific spot. 

Jeffrey:

Right, and that spot is in the Amazon 31, or whatever?

Jacob:

No, the website host is in WP engine– this is just an example where you’re hosted– and then the DNS is on for me is on Amazon’s system and they have to talk to each other. Now, if something gets configured incorrectly in Amazon service, or if Amazon has some unforeseen thing, which Amazon never does cause it’s so huge, I’ve like never seen it go down… But. um,

Jeffrey:

Oh, what if there was like a power outage or something? 

Jacob:

No, no, no, no, no. They’ve thought of this too many ways. That is good. The Amazon servers is basically like a zombie. I don’t know how many ways an attack would have to happen to kill Amazon services.

Jeffrey:

Okay, but, so a 404 error is on your side, like as a website owner or developer, that’s like a “you problem.” A DNS would be, like a “them problem.” 

Jacob:

Theoretically, definitely going to be on the developer side of things. Whoever is in charge of your DNS. So, most clients, most business owners, people that hire someone else to do their website, they don’t want to touch that ever. Usually there’s someone else that touches that for them. Because it’s very confusing. It feels a little like filling out like, you know, a W9, like government paperwork, and you’re like…

Jeffrey:

We’ve talked about this several times. I’m still largely confused about all of this, so…

Jacob:

It’s okay. I mean we just saw… it was really funny after that episode released where we talked about all that over analogies, within days of that episode releasing a client sent me… I asked for the DNS and I got the CMS information again, which I already had. And then they sent me stuff to another service that was related to their IT needs. And then they sent me to a guy that had the access to that thing.

Jeffrey:

Yeah, ’cause they didn’t want to touch it either. And then when you asked them, they were just like, “uh, what are you asking me?”

Jacob:

Yeah. So it’s all right. This is a… it’s a big… it’s a common pain-point, but that’s another service level thing, but you know, we were, this episode was about HTTP response codes. That’s DNS interacting with that. Most HTTP response codes are for what happens when the server, on the server side, the hosting side, the machine, is giving stuff. So like 502, like I said, that’s a server problem. 404, on the server, your content management system is sitting there and there’s a problem there. A redirect is part of the content management system that sits on the hosting. The DNS rarely becomes a problem because there’s so little to it. I mean, I shouldn’t say that, there’s so… I mean, I’m sure a person that works at a DNS company would be like, “Oh, no, no, no, this is really darn complicated.” 

But for everyday people, most of the time, DNS configs are: set it and forget it. Like, you will be in there when the website launches, when you want to add an email service to your company, and maybe a couple of small validation things once in a long time. I mean, for your average business, over the course of like five years, they might only touch that five times. You know, maybe once a year you will act, you will have to do something in there… so it’s really, really stable. 

And if you have an issue with that, you will know it immediately. It will be immediately like, “Oh, everything’s broken”. It’ll be a brutal slap on the hand. ‘Cause you know, it affects everything for your whole website. So if you had like one thing there, when you’re trying to switch it over to hosting and you put in one wrong number in the one wrong spot, you’re going to know, and it’s going to hurt because then it also takes about like an hour for it to solve this problem.

Jeffrey:

Is that why everybody does, like, website maintenance at, like, 2a.m., in case they mess up their DNS and everything goes down?

Jacob:

Oh, yeah. I mean, most of the stuff where I do, like automated plugin updates, or automated website maintenance checks, I have it set at, like Sunday at 2 o’clock in the morning, and then I will get an email if there’s a problem, and I will solve it quietly and never tell a soul that the problem occurred… But yes, yes, you want to do it at minimum downtime to save you the embarrassment of “Oh, it’s broke!”

Jeffrey:

Yeah. You don’t want to be down for an hour. All right, Jacob. That was actually really interesting. I didn’t think that it would be for me. I didn’t think that I would be interested in this topic. You brought it up the other day and I was like, “Okay, I can write some questions on that.”  But it was actually pretty, pretty informative.

Jacob:

Yeah. I’m glad, you know, it’s, it’s like a little hidden bubble. 

Jeffrey:

Alright, well, Jacob, this has been a fun episode. Thank you guys.

Jacob:

See ya.

subcribe

Almost never miss an episode!

Well, we're only human.

Subscribe to receive emails in your inbox when every new episode drops ... or when we want to send you obnoxious emails to sell you stuff you don't really need.

Just kidding, we respect the privilege of being in your inbox.

Email Subscribe

"*" indicates required fields

Name*
This field is for validation purposes and should be left unchanged.
sponsors