What are HTTP Status Codes and what do they mean

HTTP status codes are sent back from the web server when you request a web page. Each code has a specific meaning. Whilst there are probably nearly 100 different codes, here are the main ones that you are likely to encounter.

200 OK

This is the code you'll see most often. When you request a URL, a successful response will be sent back with 200 OK.

301 Moved Permanently

When you want to redirect a user to a different URL, you can send a 301 Moved Permanently code, along with a Location header containing the URL to redirect to. This code is often used in SEO to tell search engines that the URL has been permanently moved and the spider should follow the redirect to find the content.

304 Not Modified

This is often seen in place of 200 OK - when caching is configured, sometimes a web server will respond with 304 Not Modified instead of 200 OK, which tells your web browser that it can use it's cached copy of the file instead of downloading it all over again. This improves the performance of web pages by preventing browsers downloading files they have already got a copy of.

404 Not Found

Oh, the dreaded 404 Not Found error! This code is sent by a web server when the URL your browser has requested cannot be found on the server.

418 I'm A Teapot

This is one of the lesser known HTTP codes, but is in fact a legitimate part of the HTTP protocol! This code is sent when the web server refuses to brew coffee, because it is in fact a tea pot. This code was entered in to the HTTP standard in April Fools' jokes in 1998 and 2014, but has never been removed. Possibly because everyone likes a nice cup of tea, who knows!

500 Internal Server Error

This is undoubtedly the most dreaded code to receive. It means that the server has encountered a fatal error whilst processing your request, and cannot continue. If you receive a 500 Internal Server Error in a project such as WordPress, generally this means that you have a syntax error or some other serious fault with the underlying PHP code.

Further Reading

Share this content!