What is a 307 redirect?

A hypertext transfer protocol (HTTP) 307 redirect status code shows that a specific resource requested by a browser has been temporarily moved to a different location.

307 redirect status code

(Image Source)

307 redirect explained

HTTP status codes are the messages that servers and browsers use to communicate back and forth.

When a 307 redirect code is thrown, it means that one URL has been temporarily relocated to a different URL that may change again in the future.

For this reason, it should not be used to redirect a URL that has been changed permanently.

307 redirect history

HTTP was created as the universally accepted language for the web almost three decades ago by Tim Berners-Lee from CERN.

HTTP standards were developed as a guideline outlining what each HTTP code can and should be used to do.

These are typically three-digit status codes beginning with any number between one through five, with each block of numbers serving a different purpose.

The 307 redirect code was added to the HTTP standard with the development of HTTP 1.1, which was first created in 1997 to deliver web pages faster than the original HTTP.

http protocol versions

(Image Source)

307 redirect uses

There are many instances where it might be useful to use a temporary redirect link on your website.

For example, if you are running a monthly contest or sweepstakes on your site, you may want to change the link to the sweepstakes after every month as the giveaway items change.

That way, visitors trying to enter the current giveaway won’t accidentally find old information about last month’s giveaway that has already ended.

Or maybe you want to design a page that lists all of the special offers on your site, but you want to have the ability to change the URL as you switch up different promotions.

In these situations, it makes more sense to use a 307 temporary redirect instead of a permanent one to keep your site visitors from trying to visit a URL that is no longer relevant.

307 redirect misunderstandings

A 307 temporary redirect code can sometimes appear out of error when it shouldn’t.

For example, a misconfigured server can improperly send out 307 redirect codes instead of a 200 OK code that is usually sent out during successful requests.

If 307 redirect codes are showing up on your site that you didn’t put there yourself, you should go through each of them to determine if they are appropriate or if a server misconfiguration is causing them to appear.

If this is the case, these unexpected codes will hinder your site’s ability to serve users.

Contact the owner of your web server software or your site’s content management system to find a solution.

Another common idea about 307 redirect codes is that they are the same as 301 or 302 redirect codes. This way of thinking is a misconception.

It is true that these status codes contain information about where visitors can find the new location of the page that they originally requested.

However, a 301 redirect code notifies search engines and browsers that a URL has permanently changed.

307 redirect misunderstandings

(Image Source)

A 307 code is similar to a 302 redirect code in the sense that they are both temporary redirects, but they aren’t the same thing. A 307 redirect code can be thought of as a specific version of a 302 temporary redirect.

With a 307 code, visitors are redirected to a new temporary URL, but future requests are still able to access and use the original one.

If you’re sure that you’ll still need your original URL in the future, a 307 redirect may be best for you.

Use 307 redirects with URLs that will only be temporarily used for a very short period of time.

If you plan to create a temporary redirect that will be used for a longer length of time, a 302 code may be the better choice.