Web Development

HTTP Status Codes let’s you know what’s going on on a website. These may indicate problems or successful requests. Here are Common HTTP Status Codes you’ll be encountering when developing for the web.

HTTP Status Code 200

An HTTP Status of 200 means that it got a successful response from the server.

$ curl -I http://existing-website.com
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Vary: Accept-Encoding
Status: 200 OK

HTTP Status Code 404

An HTTP Status of 404 means that a website or page does not exist.

$ curl -I http://non-existent-website.com/
HTTP/1.1 404 Not Found
Content-Type: text/html; charset=utf-8
Content-Length: 1564
Connection: keep-alive
Vary: Accept-Encoding
Status: 404 Not Found

HTTP Status Code 301

A HTTP Status of 301 means that a website or page has bee moved permanently

$ curl -I http://old-website.com/
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Sat, 07 Nov 2015 08:24:12 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: http://new-website.com/

HTTP Status Code 302

A HTTP Status of 301 means that a website or page has bee moved temporarily

$ curl -I http://temporarily-moved.com/
HTTP/1.1 302 Found
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Status: 302 Found

HTTP Status Code 403

A HTTP Status of 403 means you are accessing a website or webpage where you do not have the proper access to

HTTP Status Code 50x

A HTTP Status of 50x means that there is a server problem. This could mean a lot of things from an Internal Server Error, Not Implemented, Bad Gateway, Service Unavailable and Gateway Timeout.

Try it out now!