How Google handles 307/HSTS redirects is completely defined within the newest ‘Ask Google Webmasters’ video with John Mueller.
Specifically, Mueller addresses the next query:
“How does Googlebot interact with HSTS/307s?”
An HSTS redirect can be utilized to drive browsers to go to the HTTPS model of a web page.
These sorts of directs might be helpful in instances the place somebody hyperlinks to an HTTP URL as a substitute of an HTTPS URL.
When the link is clicked on, the HSTS/307 redirect will make sure the customer lands on the HTTPS URL.
That’s what occurs when browsers work together with 307’s. What occurs when Googlebot does?
Here’s what Mueller says:
“In short, [Googlebot] doesn’t interact with them. 307 redirects are generally not real redirects. So what does that mean?
Well when you make a site HTTPS you can optionally use HSTS. HSTS tells users to only get the HTTPS version of a page.
So, when a user enters a URL, or clicks on a link that would otherwise go to HTTP, the browser remembers the HSTS and goes directly to the HTTPS version.”
Continue Reading Below
If a site proprietor makes use of the URL Inspection software on a web page with HSTS, they’ll see that it has a 307 redirect in place.
However, Mueller emphasizes HSTS acts like a redirect, but isn’t a true redirect.
It’s not a true redirect as solely browsers are succesful of seeing a 307; it doesn’t imply something to Googlebot.
When Googlebot crawls a HTTP web page with HSTS, it is not going to be redirected to the HTTPS model as a browser would.
“And that’s fine,” Mueller provides.
Of course, that’s solely superb if the HTTPS URLs are listed and crawlable. HSTS isn’t a software for getting hyperlinks found.
If you’re migrating from HTTP to HTTPS, for instance, HSTS is not going to assist Google uncover your new hyperlinks. For that you’ll have to use correct 301 redirects.
Continue Reading Below
HSTS is an non-compulsory software that be used along with a true redirect so as to be completely certain customers are touchdown on safe pages.
Here is the rest of Mueller’s response:
“To make it clear what’s happening – it acts like it was a redirect. Chrome calls this a 307 redirect. So, if you use Chrome, and you see a 307 result code with a tool, it’s not really there.
When it comes to Googlebot, we try to crawl URLs with a fresh slate. So we wouldn’t keep the HSTS list, and rather just directly access the HTTP URL directly.
If that URL redirects, which is usually the case with an HTTP and HTTPS site, we would follow that. So, in short, Googlebot doesn’t see the 307 that you’d see in the browser. And that’s fine.”
See the full video below (there are some enjoyable bloopers on the end):