HTTP status codes are an essential part of running a website. If you handle your site’s management by yourself, it’s crucial to know what redirects are and how to use them. You may have heard of a 301 or 302 redirect, but what does 307 mean?
That’s precisely what we’re going to explore in this post.
By the end, you’ll be a master of the 307 status, know when to use it, and when it’s best to use another status code.
What is a 307 redirect status response code?
Status code 307 is new to many people because it’s still “new.” In fact, if you’ve ever used a 302 redirect, this is very similar in nature. The main difference between the two is that:
- 302 changes the request method
- 307 doesn’t change the request method
You can view this type of redirect as a new and updated version of its 302 counterpart. However, don’t expect 302 redirects to disappear.
Why Should You Use Redirects?
Redirects are primarily used when a page no longer exists or can be found at another location. A 307 status code is temporary, meaning that the resource is expected to return in the future.
What Is a 307 Temporary Redirect?
When compared to a 302, the main difference is that this redirect is used to keep the method in place. For example, let’s assume that a user tried to upload a file and for some reason, an error occurs.
The 307 will allow the method to remain, whether GET or PUT, to give a predictable response.
With a 302, older web clients may change a method to GET even when it is not the originating method. Due to the unpredictability of the GET, it’s crucial to use a 307 in this case.
307 redirect misunderstandings
Infrequently, a server may produce a 307 response code instead of a 200 when there is a misconfiguration. Since many people haven’t seen or heard of this response before, they’re often concerned when it shows up in their logs.
- Check where the redirect originates
- Verify that the redirect is valid
You can then correct the issues.
Finally, it’s important to know that statuses 307, 302 and 301 are not the same. Each redirect has its own use and should be used strategically.
Do 307 redirects affect SEO?
When to Use a 307 Redirect
Utilizing the correct redirect at the right time is essential. Since HTTP code 307 is temporary, you want to use it in very special cases, such as:
- Monthly contests where the destination page may change
- Special offer pages where people are redirected to different promotions
- Any time a page is temporarily changed to another URL
Are 307 redirects cached?
No. Search engines do not index or cache these redirects. If you want the page to be cached by the browser, you need to take additional steps by adding one of the following into the response header:
You can setup a general(not necessarily a 307) redirect, this in numerous ways. It’s possible to perform on a page-by-page basis by adding the following code into the page’s HTML:
<meta http-equiv="refresh" content="time; URL=new_url" />
If you want to setup a 307 redirect, the easiest way is to put the following code into the .htaccess:
Redirect 301 / https://example.com/
Are 307 redirects bad for SEO?
No. The 307 redirect SEO impact is minimal because the new resource isn’t added to search engine indexes. In fact, none of the authority of “link juice” passes from the original resource to the new one.
If you enter redirect loops or something similar, this may have a negative impact on your rankings.
How do I fix 307 redirect?
If, for some reason, you find an HTTP 307 error, you should take your time to track down the page where the redirect originates. You can do this by going through your log files and looking for the issue.
The HTTP error 307 may be caused by:
- Malformed redirects
- Server configuration errors
If you’re using a plugin to create the code 307 and there’s an error, be sure to check that the plugin is configured properly and that it’s updated.
Finally, if nothing else works, talk to your web host to see if there’s an issue with the server configuration that may be causing error codes.
A few key takeaways to concern yourself with are:
- 307 HTTP code usage is for temporary redirects – the original page will return
- Search engines do not index the new page
- Caching only occurs if you add it in explicitly
- Errors are usually server errors or human error when creating the redirect
At this point, you should be able to clearly understand what is a 307 and how it impacts your site’s SEO. Let’s take a look at some of the questions involving best practices.
In which situations are 307 redirects commonly used?
Below, we’re going to outline a few key differences and situations when you will want to use an HTTP 307 over other types of redirects.
In which case is it more appropriate to use 307 redirect instead of 301 one?
A general rule of thumb is to use a 301 when the resource is changed to a new location permanently. For example, if you’re migrating a website, you would want to use a 301 redirect because the page is never planning to return.
The 301 redirect also passes on link juice and authority to the page it is sent to via the header information.
Instead, none of this happens with a 307 redirect. This status code is temporary, meaning that it’s expected that the resource will return in the future. None of the SEO value of the original page is passed through the redirect.
What is the difference between a 302 and 307 redirect?
A 307 means the same as a 302 in that the redirect is temporary. Both of these statuses will not pass along with SEO value in the process. Instead, the main difference is that:
- 302 doesn’t pass along the method
- 307 passes the same method along
If a PUT is used and a 302 is sent, there’s a chance that a GET is used in its place, which can cause unpredictable behavior from the browser and server. Instead, the 307 HTTP status will pass along the same method.
307 Redirects and HSTS
A 307/HSTS forces users to be sent to the HTTPS version of a website. Googlebot doesn’t interact with these redirects and will not view them as “real.” If you use a URL inspection tool, you’ll find that the HSTS will send an HTTP status code 307.
Google’s John Mueller states that HSTS acts like a redirect but really isn’t treated like one.
What can you do instead?
If you want Google to index the HTTPS version of a site, you need to use 301 redirects. Otherwise, the crawler will continue to go to the HTTP version of the site and ignore the HSTS sent in the header.
You can see the entire talk with Mueller in the video below:
Common 307 Redirect Mistakes & How to Avoid Them
Why HTTP 307 Errors Happen
A 307 internal redirect is fairly simple to set up. If you put an added space in the coding or an additional letter, errors can occur. Additionally, these errors can occur for the following reasons:
- Your server isn’t properly set up to handle the redirect
- Plugins aren’t updated or running properly
- A misconfiguration occurs
Pinpointing errors can be problematic, so it’s up to you to track them down by diligently looking through .htaccess files or other areas where the redirect may occur. You can also look through log files (it’s a tedious process) or run tools, like ours, to understand the HTTP response of all pages on your website.
Click here to get started with our Mazeless SEO tool.
Why do I get a 307 status code for my s3 bucket in Amazon?
An HTTP status 307 on an s3 bucket is only common during the first day or so. The reason this happens is that the bucket is propagating across regions and redirects are used. However, you shouldn’t see these codes after the first day or two.
Why do I get a 307 status code when I check my site on CloudFlare?
Inside of CloudFlare, check to see if you have the HSTS option enabled. If so, this is the reason that you’re seeing this response code. In fact, we’ll cover this more in-depth in the next question.
Why am I seeing a 307 response in Google Chrome browser but not when I test with other tools?
Typically, the reason for this HTTP code 307 is that the site is using HSTS to redirect the HTTP page to the HTTPS page. As John Mueller states in the video earlier in the last section, Chrome will show the HSTS as a 307, even if other tools do not.
A 307 definitely has its place in the family of redirect options. Learning to master this code and when to use it can help you use redirects more efficiently.