HTTP codes

What is an HTTP code?

An HTTP code is a code that a web server issues in response to a request. They allow the web server to communicate with visitors’ browsers, essentially informing the browser whether everything is ok or there is an issue. While HTTP codes are primarily associated with errors, every request generates a response, which has a specific code assigned to it.

The five types of responses

There are five different types of HTTP responses. Each response type has its own prefix, making it easier to identify.

Information responses – 1xx

Information responses are sent as a confirmation that the web server has understood a request. Information responses are prefixed by ‘1’ and follow the ‘1xx’ convention. An example of an information response is ‘100 Continue’, which indicates that the server has received the headers and is now waiting for the body.

Success responses – 2xx

Success responses are sent as a confirmation that a request has been processed successfully. All success responses are prefixed by ‘2’ and follow the ‘2xx’ convention. An example of a success response is ‘200 OK’, which indicates that an HTTP request was completed successfully.

Redirection responses – 3xx

Redirection responses are sent when the client must take additional steps for a request to be completed. All redirection responses are prefixed by ‘3’ and follow the ‘3xx’ convention. An example of a redirection response is ‘308 Permanent Redirect’, which indicates that a resource was permanently moved and all future requests should be sent to the supplied URI.

Client error responses – 4xx

Client error responses are sent when the client is the cause of the error, such as having sent a bad request. All client errors are prefixed by ‘4’ and follow the ‘4xx’ convention. An example of a client error response is ‘404 Not found’, which indicates that the client has requested a resource that is not available.

Server error responses – 5xx

Server error responses are sent when the server encounters an error that originates from the server’s end. All server error responses are prefixed by ‘5’ and follow the ‘5xx’ convention. An example of a server error response is ‘500 Internal server error’, which indicates that the server has come across an unexpected error.

How do HTTP codes work?

HTTP Codes are part of the HTTP standard, which ensures that browsers and web servers are able to understand them equally. HTTP codes facilitate the communication between servers and browsers through a structured codeset that affirms actions or informs the other party that there is an issue.

Why do we have HTTP codes?

HTTP codes can help administrators troubleshoot issues with their a WordPress website and the web server. Basically you can tell what is wrong with the website. Even when you get a generic, error such as ‘500 Internal Server Error’, there is still a lot to learn from such errors. When using the right tools, and when you know which of the web server log files that WordPress admins have access to you need to look into,  they can help you get to the bottom of the issue faster.

HTTP codes can also be used in SEO (Search Engine Optimization) such as 301 and 302 redirects, which may affect SEO efforts.

Stay in the loop

Subscribe to the Melapress newsletter and receive curated WordPress management and security tips and content.

Newsletter icon

It’s free and you can unsubscribe whenever you want. Check our blog for a taste.

Envelope icon

 Boost your sites’ security and management! Download our free eBook on WordPress oversight.

Uploading WP 2FA as a zip file in WordPress
WP 2FA in the WordPress plugin repository
Close

Installing WP 2FA Free

Congratulations on taking the first step towards enhancing your WordPress site's security with WP 2FA Free! You're now on your way to protecting your valuable data and ensuring peace of mind. No coding or technical knowledge is required.

 

Below are two ways to install WP 2FA on your website:

Go to your plugin dashboard on your site, then go to "Add New", and then search for WP 2FA.

Download the WP 2FA plugin zip, then select upload in your plugin dashboard under "Add New".

OPTION 1

OPTION 2

Uploading CAPTCHA 4WP as a zip file in WordPress
CAPTCHA 4WP in the WordPress plugin repository
Close

Installing CAPTCHA 4WP Free

Well done you. You're one step closer to safeguarding your WordPress website from spam and automated attacks with CAPTCHA 4WP. You'll be able to effortlessly integrate CAPTCHA into your forms and enjoy a website with enhanced security.

 

Below are two ways to install CAPTCHA 4WP on your website:

Go to your plugin dashboard on your site, then go to "Add New", and then search for CAPTCHA 4WP.

Download the CAPTCHA 4WP plugin zip, then select upload in your plugin dashboard under "Add New".

OPTION 1

OPTION 2

Uploading WP Activity Log as a zip file in WordPress
WP Activity Log in the WordPress plugin repository
Close

Installing WP Activity Log Free on your website

You deserve a pat on the back for choosing to record user actions and changes on your website. That is the first step towards better user accountability, easier troubleshooting of website security, and many other benefits of issues.

 

Below are the two ways to install WP Activity Log on your website:

Go to your plugin dashboard on your site, then go to "Add New" and then search for WP Activity Log.

Download the WP Activity Log plugin zip, then select upload in your plugin dashboard under "Add New".

OPTION 1

OPTION 2

Uploading Melapress Login Security as a zip file in WordPress
Melapress Login Security in the WordPress plugin repository
Close

Installing Melapress Login Security Free

Congratulations on taking control of your WordPress website's security by implementing robust login and password policies with Melapress Login Security. You can change your login page URL, limit failed login attempts, and reset passwords.

 

Below are two ways to install Melapress Login Security on your website:

Go to your plugin dashboard on your site, then go to "Add New" and then search for Melapress Login Security.

Download the Melapress Login Security plugin zip, then select upload in your plugin dashboard under "Add New".

OPTION 1

OPTION 2