SEO News

308 Permanent Redirect: What It Means & When to Use It


What Is a 308 Permanent Redirect?

A 308 Permanent Redirect is an HTTP response status code—a three-digit number sent by a web server in response to a client’s request—that tells browsers and search engines that a resource has permanently moved to a new URL. 

Other HTTP response status codes you might be familiar with include the 404 error, which means the server can’t find the requested page.

As a user, it’s usually obvious when you encounter a 404 HTTP response status code. You’ll see an error page (like the one pictured below). 

308 Permanent Redirect: What It Means & When to Use It

But you typically won’t notice a 308 HTTP response status code. 

That’s because when you encounter a 308 Permanent Redirect, the browser redirects you to the correct URL automatically.

An image showing a redirect from " Toys 2010" to " Toys 2022" page

And in terms of SEO, link equity—the value passed by links—and authority may be passed on to the new page as well.

How to Check Your Website for 308 Permanent Redirects

To see if you have any 308 Permanent Redirects on your site, use Semrush’s Site Audit tool.

To start, set up a new project or click on the project you’d like to check your redirects for.

"Create project" pop up window in Site Audit tool

After the audit loads, click the number beside “Redirects.”

"Redirects" highlighted under Crawled Pages section

This report lists all your redirects, including their HTTP status codes.

Redirects report in Site Audit tool

Review this report and make note of which pages use 308 Permanent Redirects. 

Later, we’ll go over when you should use a 308 Permanent Redirect. You can refer back to your Site Audit to ensure you’ve used the 308 properly.

308 vs. Other 3xx Redirects

A 3XX redirect is a type of HTTP status code that instructs browsers and search engines to go to a new URL. 

Each 3XX redirect represents a specific type of redirect with distinct purposes. Which may include indicating whether the redirection is temporary or permanent. 

A 3XX also determines if the browser can change the request method (POST/GET) upon redirection.

(We’ll go over POST and GET request methods in the next section.)

With that in mind, here’s what a few different 3XX redirects mean:

  • 301 Moved Permanently: Signifies that a resource has been permanently relocated, and it allows for a conversion of the original request method from POST to GET. Search engines will update their links to the new resource.
  • 302 Found: Indicates that a resource has been temporarily moved, and it advises maintaining the original request method of POST or GET. Search engines don’t update their links to the temporary resource.
  • 307 Temporary Redirect: Specifies a temporary resource relocation and advises preserving the original request method of POST or GET. Search engines don’t update their links to the temporary resource.
  • 308 Permanent Redirect: Conveys a permanent resource relocation and advises preserving the original request method of POST or GET. Search engines will update their links to the new resource.
Different types of redirects and what they mean

301 vs. 308 Permanent Redirects

301 and 308 redirects are both permanent redirects with one distinction—whether the browser can change the request method.

So, what does that mean?

Request methods, also known as HTTP request methods, are commands used to specify the desired action to perform on a resource. 

Common HTTP request methods include POST and GET, as noted above in the different types of 3XX redirects.

The GET method retrieves data. 

For example, when you enter a URL in your web browser and press “Enter,” your browser typically sends a GET request to the server that hosts the website.

The server then sends back the website. And your browser displays it.

The POST method submits data. It’s more secure than the GET method.

For example, when you fill out a form on a website and click a submit button, your browser sends a POST request to the server. 

Then, the server processes the information you submitted (like your name and email address).

When you specify a 308 Permanent Redirect, you forbid the browser to change the HTTPS request method. 

In other words, if the client made the original request using the POST method, the browser should continue to use the POST method when following the redirect.

Maintaining a POST request method is important if you want to secure and safeguard data, like login credentials. Or if you want to save data, like order information.

Which Redirect Is Better for SEO: 308 or 301?

Google’s John Mueller explains that Google generally treats 308 and 301 redirects the same (as long as you use a 308 to indicate a permanent move). 

John Mueller's reply to weather 308 redirects get treated the same as 301 redirects

In another post, he adds that 308s can be cleaner if you’re unsure which request the site gets:

John Mueller's reply to why did 308 redirects become more popular

If you’re unsure which to use, here are a few examples of when a 308 Permanent Redirect is the right choice:

When Should You Use a 308 Permanent Redirect?

You should use 308 Permanent Redirects when you want to maintain the original HTTP request method (like POST or GET) throughout a permanent redirect.

Here’s an example:

Imagine you have an ecommerce website. A user adds items to their shopping cart, and when they’re ready to complete their purchase, they click “check out.” The website uses the POST method to securely process and submit their order. 

However, because the user isn’t logged in, you first want to redirect them to a login/registration page before they can proceed with the checkout. 

To ensure items stay in the user’s shopping cart throughout the login/registration process, you can implement a 308 to a login page.

This way, you can maintain the original POST request method. 

Then, when the user successfully logs in or registers, your site directs them back to their shopping cart page, and their items remain in the cart. This ensures a seamless shopping experience. 

Shopping cart pages leading to a a login/registration page

In this example, a 308 preserves the original HTTP request method so the user doesn’t lose the items in their cart. If the site had a 301 redirect (and the request method was changed), the user might lose the items.

Another example of when to use a 308 is for registration pages. 

Say users register to use your site. After users fill out their details, your website directs them to a confirmation page with the URL example.com/thank-you. 

On the confirmation page, you tell the user to check their email and input the code they received to activate their account. 

A confirmation page, with "Please verify your email" message

Now, suppose you want to change the confirmation page’s URL from example.com/thank-you to example.com/confirmation. 

To ensure the user’s registration data remains intact and transferable, you could use a 308 Permanent Redirect.

That way, the information (from when the user registered for your site) is preserved and transferred as your site directs users to the new confirmation page. And they can activate their accounts without running into any issues. 

Managing Your Redirects

Use Site Audit to go through and make sure your site uses the proper redirect every time. 

Pay attention to pages that process user information. 

Like a login page. Or a shopping cart. 

Make sure these pages use a 308 to ensure your site processes their data properly. And doesn’t lose it throughout the redirection.

Using the proper redirect for your pages ensures visitors end up on the right page with no interruptions. 

And when you’ve used the right redirect, search engines can more easily understand and pass link equity to the new destination.





Source link : Semrush.com

Related Articles

Back to top button
error

Enjoy Our Website? Please share :) Thank you!