Redirect

A technique used to send website visitors from one URL to another. When a redirect is implemented, anyone who tries to access the original URL will automatically be sent to the new URL instead.

There are several reasons why website owners might use redirects. For example:

  • To redirect visitors from an old URL to a new one after a website redesign or restructuring
  • To redirect visitors from a non-preferred version of a URL (such as the HTTP version) to the preferred version (such as the HTTPS version)
  • To redirect visitors from a broken or deleted page to a new or relevant page on the same website

Below are examples of the most common redirect codes:

  1. 301 Permanent Redirect: This code indicates that the original URL has permanently moved to a new location, and that search engines should update their indexes accordingly. It is the most commonly used redirect code for SEO purposes.
  2. 302 Found (Temporary Redirect): This code indicates that the original URL has temporarily moved to a new location, and that search engines should continue to index the original URL.
  3. 307 Temporary Redirect: Similar to the 302 code, this code indicates that the original URL has temporarily moved to a new location, but is intended for use with HTTP/1.1 clients.
  4. 308 Permanent Redirect: Similar to the 301 code, this code indicates that the original URL has permanently moved to a new location, but is intended for use with HTTP/1.1 clients.
  5. 410 Gone: This code indicates that the original URL no longer exists and has been permanently removed from the server. It is used to notify search engines that the content is gone for good.
  6. 451 Unavailable For Legal Reasons: This code is used when a server is legally required to deny access to a resource, such as in cases of censorship or copyright infringement.