When you visit a website, your web browser sends a request to the webserver. The web server then accepts that request and sends a response back. This response is called a response. Usually, it is denoted by a 3-digit number called the HTTP status code. This guide will teach you why it's important to pay attention to the HTTP status code.
How can you use HTTP status codes to troubleshoot website issues and improve user experience on your site?
By understanding what the different HTTP status codes mean, you can troubleshoot website issues more effectively and improve the user experience on your site. For example, if you see a lot of 404 errors in your web server logs, that means visitors are trying to access pages that don't exist on your site. You can use this information to create new pages or redirect visitors to existing pages.
What is the purpose of the HTTP status code?
HTTP status codes are used to communicate with browsers, and they can tell you a lot about what's going on with your website. In general, HTTP status codes fall into one of five categories:
- 1xx informational responses: Refer to in-progress received requests.
- Successful HTTP statuses - 2xx success.
- Redirecting requests - 3xx redirection.
- Client-side related errors - 4xx client errors.
- Server-side related errors - 5xx server errors.
What are some common HTTP status codes:
200 OK - This status code indicates that the request was successful.
301 Permanent Redirect - The web page you are attempting to visit has been permanently moved to a new location.
302 Temporary Redirect - Visitors are passed to the new page. However, link equity is not passed.
400 Bad Request - This status code indicates that there was an error with the request.
401 Unauthorized - This status code indicates that the user is not authorized to access the requested resource.
403 Forbidden - This status code indicates that the user is not allowed to access the requested resource.
404 Not Found - This status code indicates that the requested resource could not be found.
500 Internal Server Error - This status code indicates that there was an error on the server.
503 Service Unavailable - This code means that the server is unavailable, usually when the server is overloaded or down for maintenance.
Why is the HTTP status code important for SEO?
By understanding the HTTP status codes, you can effectively manage your website and improve the user experience. You can troubleshoot website issues, create new pages, or redirect visitors to existing pages by paying attention to the different codes.
Overall, using HTTP status codes is a helpful way to manage your website and ensure that users have a positive experience on your site.
HTTP status codes are lot more prevalent than we see them. For instance, if you try to visit http://cnn.com, it 301 redirects to http://www.cnn.com.
http://www.cnn.com again 301 redirects to https://www.cnn.com.
Finally, https://www.cnn.com 302 redirects to https://edition.cnn.com and https://edition.cnn.com responds the web browser with the 200 OK status code. This is known as a redirect chain.
Here is a full list of HTTP status codes
- 100 Continue
- 101 Switching Protocols
- 102 Processing
- 200 OK
- 201 Created
- 202 Accepted
- 203 Non-authoritative Information
- 204 No Content
- 205 Reset Content
- 206 Partial Content
- 207 Multi-Status
- 208 Already Reported
- 226 IM Used
- 300 Multiple Choices
- 301 Moved Permanently
- 302 Found
- 303 See Other
- 304 Not Modified
- 305 Use Proxy
- 307 Temporary Redirect
- 308 Permanent Redirect
4×× Client Error
- 400 Bad Request
- 401 Unauthorized
- 402 Payment Required
- 403 Forbidden
- 404 Not Found
- 405 Method Not Allowed
- 406 Not Acceptable
- 407 Proxy Authentication Required
- 408 Request Timeout
- 409 Conflict
- 410 Gone
- 411 Length Required
- 412 Precondition Failed
- 413 Payload Too Large
- 414 Request-URI Too Long
- 415 Unsupported Media Type
- 416 Requested Range Not Satisfiable
- 417 Expectation Failed
- 418 I'm a teapot
- 421 Misdirected Request
- 422 Unprocessable Entity
- 423 Locked
- 424 Failed Dependency
- 426 Upgrade Required
- 428 Precondition Required
- 429 Too Many Requests
- 431 Request Header Fields Too Large
- 444 Connection Closed Without Response
- 451 Unavailable For Legal Reasons
- 499 Client Closed Request
5×× Server Error
- 500 Internal Server Error
- 501 Not Implemented
- 502 Bad Gateway
- 503 Service Unavailable
- 504 Gateway Timeout
- 505 HTTP Version Not Supported
- 506 Variant Also Negotiates
- 507 Insufficient Storage
- 508 Loop Detected
- 510 Not Extended
- 511 Network Authentication Required
- 599 Network Connect Timeout Error