What Is a 307 Redirect?
- 1 What Is a 307 Redirect?
- 2 How Does a 307 Redirect Work?
- 3 What Is The Difference Between a 307 and a 302 Redirect?
- 4 What Is The Difference Between a 307 and a 308 Redirect?
- 5 What Is The Difference Between a 307 and a 303 Redirect?
- 6 What Is The Difference Between a 307 and a 301 Redirect?
- 7 When To Use The 307 Redirect
- 8 How To Implement a 307 Redirect
- 9 When Should You Fix a 307 Redirect
- 10 Should You Use a 307 or a 302 Redirect For SEO?
- 11 The Bottom Line On The 307
307 redirects, much like 308 redirects, are a newer addition to the status code family. And while you can go your entire life without using them, it’s worth knowing how they work and what makes them different from the standard, more popular and more widely-used 302 redirect.
Here’s the rundown on the 307 redirect:
What Is a 307 Redirect?
The 307 redirect is a temporary redirect. In that sense, it is similar to the 302. It means that the page someone is requesting has temporarily been moved to a different URL, but that it will eventually be back (or permanently redirected to another page).
A 307 does not pass on any link equity to the destination URL, so the new URL won’t be indexed either.
Much like with the 308 permanent redirect, the 307 forces browsers to use the same type of request that was originally made. With the 302, if a POST request was used on the original page, it can be switched to a GET request on the target page. With a 307, an original POST request will stay a POST request on the target page too.
Note that only modern browsers actually support this request method, and that older browsers will not be able to handle a 307. Here’s a list of browser versions that support modern redirects, like the 307 and 308.
How Does a 307 Redirect Work?
To understand how a 307 redirect works, it will be helpful to understand how redirects work in general.
Your browser sends a request to a web server for the page you are trying to visit. The server then responds with an HTTP status code: in this case, with a 307. The browser will then send its request to the new URL location. The server will again respond, this time with a 200 status code.
With the 307, if the original request was a POST request, the server will have to respond in the same way, and won’t be able to change it to a GET request.
Note: a GET request does not modify the state of the server when retrieving data from it. A POST request can modify its state while sending data to it for processing.
What Is The Difference Between a 307 and a 302 Redirect?
Both the 307 and the 302 are temporary redirects.
The difference between a 307 and a 302 redirect is that 302s let browsers use a different type of request from the original one. With a 307, this is not possible, and the same request method has to be used both for the original request and the new destination page.
What Is The Difference Between a 307 and a 308 Redirect?
The difference between a 307 and a 308 redirect is that the 307 is a temporary redirect, while the 308 is permanent. In that sense, the difference is quite like the one between the 302 and the 301.
However, much like the 307, the 308 will adhere to the same type of request on the target page (i.e. a POST request will stay a POST request).
What Is The Difference Between a 307 and a 303 Redirect?
The 307 redirect and the 303 redirect are nothing alike.
While the 307 is a temporary redirect, the 303 is a See Other status code. It means that the requested page can be found at a different URL, by using a GET request.
What Is The Difference Between a 307 and a 301 Redirect?
The 307 and the 301 are polar opposites.
While the 307 is a modern temporary redirect that does not allow a request method change, the 301 is a permanent redirect, and it does allow for a request to be changed from a POST to a GET.
When To Use The 307 Redirect
You can use the 307 redirect when you want to temporarily move a page to a new URL. The key term here is temporary: the redirect should at some point either be removed completely, or it should be turned into a permanent one. Since the 307 does not pass link equity to the destination page, you shouldn’t leave it in place forever.
Also bear in mind that older browsers don’t know how to handle a 307, so if you suspect your core audience might be using outdated ones, you may want to use a 302 instead of the 307.
How To Implement a 307 Redirect
There are two ways to set up a 307 redirect: by using a plugin, or by updating the .htaccess file.
If you are already using Yoast as your preferred SEO plugin, you can use it to edit the .htaccess file. You will need to add this code to it:
Redirect 307 /old-page/ https://www.yoursite.com/new-page/
You can also access this file on your server, if you don’t use a plugin that will let you edit it.
You can also use a plugin to add the redirect. The Redirection plugin is a great choice: it’s simple to use and is not likely to clash with any of your other plugins.
When Should You Fix a 307 Redirect
You don’t need to fix a 307 redirect if you’ve placed it on purpose. If you want a page to redirect permanently, you should turn it into a 308.
Also, if you want to improve your chances of the redirect being understood by all browsers, you may want to change the 307 to a 302.
Other than that, as long as it’s working correctly and there is no redirect chain or redirect loop, you can keep the 307 for as long as you need it. Remember to remove it once you have no more need of the temporary redirect.
Should You Use a 307 or a 302 Redirect For SEO?
Since both the 307 and the 302 are temporary redirects, neither of them is actually good for SEO. They don’t pass on any link juice, they prevent the destination page from being indexed, and they thus have no SEO value whatsoever.
This does not mean you shouldn’t use them when you need to redirect a page for a limited amount of time. Both of these redirects will work just fine, provided that you create them correctly. Arguably, you can go with the 302, as more browsers will understand it, but there is no SEO reason to avoid the 307.
The Bottom Line On The 307
The 307 is a useful tool to have in your arsenal. It will temporarily divert traffic if you need it to, but it won’t pass on any link equity to the destination page. It’s a bit more sophisticated than the 302, but just as effective in the most general sense.