My website is hosted with Firebase. It offers https out of the box. When a user hits http://example.com, it redirects to https://example.com with 307 code (Temporarily Moved). As per various SEO guidelines, this is not good practice. How to configure firebase to use 301 (Permanently Moved)?
1 Answer
I just tested this out on a Firebase Hosting site and (after disabling my browser extensions) I got a 301 redirect, not a 307.
What are you using to inspect the status code? Web browsers sometimes report a 307 status code when there's an internal redirect within the browser itself before it sends the request.
Chrome for example calls this kind of pre-request redirect a 307 Internal Redirect
, but in actuality there is no "real" HTTP request or status code. A redirect of this sort is usually caused by HSTS on the server. HSTS is a security feature that Firebase Hosting uses.
In any case, a 307 internal redirect
cannot affect SEO because it happens within the browser itself. So unless you are getting some other kind of 307, it's nothing to worry about.
-
-
I use screaming frog to inspect the url. When I hit non-www url, it show redirection with 307. The status column states "HSTS Policy". Take a look at this screenshot. ibb.co/QXLCJ1T Jan 31, 2019 at 22:02
-
@KaushalB Awesome. The fact that it says "HSTS Policy" means you are good to go for SEO! Jan 31, 2019 at 22:22