The Ultimate Guide to 3xx HTTP Status Codes

Here’s a great article from SitePoint

If you manage websites, an understanding of HTTP redirects is essential for reliable site performance. In this article, we’ll take a comprehensive look at 3xx status codes, so that you can understand how they work, how best to manage them, and their impact on SEO.

The Purpose of HTTP Redirects

A URL redirect involves one web page address being mapped to another. There’s a range of reasons why redirecting is required for your site.

For example, moving to a new domain is one of the overriding causes to use URL redirection. Sometimes your former domain name is too long and complicated to remember, or some kinds of infringing activities force you to move from one domain to another.

Let’s take a closer look at other reasons to redirect your page:

  • Forwarding multiple domains: permanent HTTP redirects are required to lead internet users and search engines to the same location while having many domain names at once.
  • Identification of broken links: 404 not found pages can be identified with the Google Search Console. The Coverage report will give you detailed information about all the on-site inbound links to fix with the help of redirecting.
  • Fixing broken URLs: after identifying the broken link, you can redirect traffic to the front page. However, a better option is redirecting every broken URL to a new page with the same (similar) content.
  • The page’s new location: if your former website has highly visited pages that are ranked high in SERPs, redirecting will help you map this URL to the new location. For this case, you must be sure that the old pages you used for redirection haven’t disappeared.
  • The need to delete a page: create HTTP redirects for all the pages you need to delete and be sure not to dread and stress out visitors with 404 not found errors. Redirecting will signal to Google or other search engines that the link value of the old links should be assigned to the redirected URLs.

Besides the main reasons listed above, there are some other cases to take into consideration. Redirecting will come in handy if you need to simplify and track display ads or cope with emergencies. Redirects help marketers with monitoring advertising responses. At the same time, web admins can fix any failed linking activity (error-driven notifications, mail chains) with the help of redirection.

To sum up, Google defines redirecting to control crawling and indexing (category of the Advanced SEO Documentation). Google Search Central explains HTTP redirects as the practice of performing a seamless transition, accessing a page through several URLs, correction of outdated URLs, and sending users from deleted pages to new ones, thereby excluding 404 not found errors.

Web Protocol Basics

The fundamental protocol on the Internet that’s used for transferring data and information control in hosting servers is called HTTP. The HyperText Transfer Protocol allows maintaining websites and providing communication between internet users and servers on the World Wide Web.

HTTP is the protocol used for information systems with different types of data: distributed, hypermedia, and collaborative. The main goal of the HyperText Transfer Protocol is to provide seamless internet-based interactions. HTTP defines modifications, and data transfer provides a web server and browser actions.

This request–response protocol works through TCP connections that are used for server communications. The Transmission Control Protocol allows internet searchers to interact with any available identified resources represented on the World Wide Web. User communication with web, video, and message servers takes place via HTTP. This way, clients can get access to web pages.

It’s worth noting that the HyperText Transfer Protocol uses proxies. They are special-purpose filters for content identification and analysis. HTTP proxies prevent users from low-quality sending and displaying files:

  • spyware text and imagery
  • malformed multimedia files
  • cyberattack-driven sound and video files

There are modes of the HTTP proxy operation. HTTP-Client is used for the protection of the user’s browser. It sends request messages to the server. An HTTP-Server is responsible for HTTP response connections. The principle of the HTTP proxy operation can be figured the following way:

HTTP proxy operation

The main benefits of the HTTP protocols are:

  • Request responsibility: the advanced scheme of addressing is provided by HTTP protocols. All the IP addresses become easy to recognize and identify on the WWW.
  • Improved interactions with web resources: flexibility and accessibility of online resources are achieved. HTTP provides the opportunity for extension and plugin downloads. This way, relevant data is displayed.

According to Hitech Whizz, there are other advantages of the HyperText Transfer Protocol to take into account:

  • Security: interception is minimized, so data transfer takes place in a risk-free mode for users.
  • Page caching: if the user visited the internet resource once before, the content available on the page will be loaded faster.
  • Reduced latency: HTTP initiates the handshaking process right after the connection is made. This option reduces connection-driven latency.

HTTP is also notable for its web protocol-specific methods. They vary from one task to another. There are nine request methods to perform different web operations.

Protocol-specific Request Description
PUT Responsible for the modification of the existing web resource. This request also allows the creation of the new URL.
HEAD Creates a request for a special-purpose resource without any need for the body content.
POST Responsible for the existing resource modifications in content adding to the new web page.
DELETE Deletes the resource specified by the webmaster.
GET Requests the resource about its integrity.
TRACE Displays any updates and changes of the web recourse visited by the user.
OPTIONS Demonstrates the list of HTTP methods that are accessible for the URL of the user’s interest.
CONNECT Responsible for the conversion of the request-based connection to the TCP/IP tunnel.
PATCH Makes it possible to undertake partial modifications of the web resource.

What Are HTTP Response Status Codes?

HTTP status codes are special elements that determine the server response and are presented as 3-rigid coherent symbols. Each HyperText Transfer Protocol code is used for REST API errors. It’s necessary to understand each HTTP status code to identify problems and solve them.

There are five classes of the status codes to take into consideration. There are informational response, successful, redirection, client error, and serve error categories. The first rigid indicates the class of the HTTP status code. Let’s take a closer look at each category of the responses:

  • 1xx informational response: this class of status codes informs about request reception. It means that the process continues. For example, 100 = continue.
  • 2xx successful: the group of these status codes is about understanding and acceptance of the request. For example, 200 = OK.
  • 3xx redirection: this class of HTTP status codes indicates that some special-purpose actions are required to complete the request. For example, 301 = redirection.
  • 4xx client error: this category of response status codes flags that the request cannot be carried out. Additionally, it might mean that there is bad syntax in the request. 400 = bad request.
  • 5xx server error: this class of HTTP status codes is about an unsuccessful server response caused by the server’s failed processing. For example, 500 = internal error.

It’s worth noting that some of the status codes and errors have a direct impact on SEO. While 1xx and 2xx classes don’t affect search engine optimization much (while having a 200 response is the best practice), 300-, 400-, and 500-level ones can negatively impact crawling and indexing your web pages. You should always take care to address 4xx and 5xx status codes and errors, as this can be very harmful to your website’s ranking as a whole.

HTTP 300 codes perhaps play the central role for SEO. This class of status codes is responsible for passing all the SEO value from your old URLs to new ones. Thus, it’s necessary to dig into each 300-level code’s meaning (temporary or permanent redirects, proxies, multiple choices, and so on).

The Complete List of 3xx HTTP Status Codes

HTTP status codes are for URL redirection. The 300-level codes indicate different types of HTTP redirects. Marketers usually use 3xx status codes to monitor and analyze user experience, the behavior of website users, and the SEO performance of the site. The DataTracker resource identifies four types of redirects distributed by 300-level HTTP status codes:

  • Redirections like 301, 302, 307 indicate that the target resource has been assigned a new URL.
  • 300 redirection offers multiple choices (selection of matching web resources according to the request).
  • 303 redirection offers an indirect response to the fulfilled request if the Location field identifies it.
  • 304 redirection provides HTTP redirects to the results that were cached upfront.

300-level status codes appear when it is necessary to indicate the redirection response from the server. Another example of the 3xx HTTP status code class in action is when the deleted page keeps its rankings. Additionally, redirects come in handy when it’s necessary to fix the broken URL.

For example, a 301 redirection was used via PHP to move all the traffic to a new page,

<?php // Permanent 301 Redirect via PHP

header("HTTP1.1 301 Moved Permanently");


This way, it preserves the ranking of the former URL. The same algorithm can be used for fixing broken URLs with the help of a permanent redirect.

Redirections don’t expect to see when errors related to other response codes take place. For example, redirects don’t solve problems with informational responses or server/client errors (Not Implemented = 501; Bad Gateway = 502; Unprocessable Entity = 420).

Let’s take a closer look at each 300-level code to understand their impact on SEO and website ranking. There are nine 3xx status codes to review, along with their peculiarities, functions, benefits, and differences.

300 Multiple Choices

These status codes are commonly used in REST APIs. Multiple choices are given to the browser that should pick sides with the resources that meet the request. For example, if you have multiple video format options or different file extensions to specify, a 300-level code will come in handy.

One more reason for using 300 redirects is to meet the requirements of agent-driven negotiations. The server informs a user-agent about available representation types to choose from. Take a closer look at the example to see the 300-redirect in action:

HTTP/1.1 300 Multiple Choices
Server: curveball/0.3.1
Access-Control-Allow-Headers: Content-Type,User-Agent
Access-Control-Allow-Origin: *
Link: </foo> rel="alternate"
Link: </bar> rel="alternate"
Content-Type: text/html
Location: /foo

You can see /foo and /bar in the coding. The location is specified when both options are accessible for choosing.

Continue reading
The Ultimate Guide to 3xx HTTP Status Codes
on SitePoint.

Source link