Minasan, Watashiwa Wawan Desu...

NurCell Movies

Sunday, February 6, 2011

5 response codes you gotta know: Learn to speak server


Whether you're an internet marketing wonk, a top IT geek or an SEO pro, you need to know how to speak web server. Not fluently, of course. If you can do the equivalent of asking where the bathroom is, you'll be in good shape. That's what I'm going to go over now.


When you visit a web site, your web browser has a whole conversation with the server hosting that site:


Browser: Hey man, can I get the page that's located at... lessee... www.gibblegibbet.com?


Server: Let me check... Yup, looks fine.


Browser: OK, thanks! Send it over!


Server: Here you go.


That entire conversation is encapsulated in a single response code. Response codes are simple, 3-digit codes that a server sends back to visiting web browsers. Web servers send the same codes back to search crawlers, so it's very, very important that you know what these codes mean.


Yeah, I know, I just oversimplified. If you reaaalllly want all the details of http headers and such, I could write it all down, but you'll have to pay me. It's really boring stuff.

There are a lot of 'em, but I'll stick to the 5 you really need to know:


The 200 code is a server's way of saying "everything's fine, here's the page or file you asked for".


That conversation would match the one I wrote above.


301 - also called a permanent redirect - means that the page the browser/crawler requested is no longer around, but there's a new page now, and the server will provide the new URL instead. That conversation goes like this:


Browser: Yo, gimme www.gibblegibbet.com/default.aspx


Server: Nope, no can-do. It's gone. But we've put up a new, permanent page at www.gibblegibbet.com/index.html. You can go there from now on.


Browser: Ah, got it. I'll make a note.


Use 301 codes when you delete one page and replace it with another, or when you rebuild your site and your entire site structure changes. That'll make your site visitors and search engines happy.


302 means the requested page is not around right now, but it'll be back:


Browser: Yo, gimme www.gibblegibbet.com/default.aspx


Server: Nope, it's gone for now. Took a vacation. But we've got an alternate up and running at www.gibblegibbet.com/index.html. Use that for now, but remember, we'll be switching back to the original soon.


Browser: Stupid detours. OK, fine.


Server: Don't get all persnickety. I just do what my webmaster says.


I embellished a bit. But you get the idea. A 302 redirect - also called a temporary redirect - tells a browser or search crawler not to look too closely at the new page, because the old one will be back.


It's rare that a 302 is a good idea. If you're using 302 redirection, make sure there's a good reason, because it could wreak havoc with your rankings.


404 means the page is gone or never existed, and the server has no idea what happened.


Browser: I need to see www.gibblegibbet.com/cheepwareznow.html


Server: Yeah, right. Sorry, that page doesn't exist. It may have once, but it's gone now.


Browser: WTH?!!!


You should fix 404 errors when you find 'em on your site, or do a 301 redirect from the missing page to a relevant one.


There are actually a lot of different 50x options: 500, 501, 502, 503, etc.. But they all mean the same thing:


Browser: Hey, can I have a look at www.gibblegibbet.com?


Server: OK, I'll aaaaaaaaaaaauuuugh.


Browser: Auuuuuuuuuuugh?


Server: thud


The server is kaput. It's dead, unconscious or just taking a break, and it can't even respond to any request. If one of our sites starts delivering 50x errors, that's my time to panic, 'cause it means something went really wrong.


Congratulations. You now speak preschool server, and can ask for basic directions when necessary. Truth is, only 1% of 1% of people involved in internet marketing need to know more than this. You can wow your tech folks in the next meeting.


If you do want to know a huge range of status codes, look at the W3C site.

comments (2) | trackbacks (0) | permalink


View the original article here

No comments: