I've recently uploaded a website on a domain via Firebase hosting. Using the domain registrar (NameCheap) I've also applied a 301 redirect rule (via NameCheap. It's called "URL redirect record" under the Host Records) so that going to "@" (for example
example.com) will redirect to
However, I noticed that if I specify either http or https scheme like so -
http[s]://example.com I get to
https://example.com (even when entering http), and get an
What's the reason for that and how can it be fixed? Am I doing some things wrong?
I'll mention that at first the 301 rule did not work when I specified to go to
https://www.example.com, and only after replacing the
https with regular
http did it work (although when visiting the site, I still see in the URL that it is in fact using https).
People have suggested HSTS (which is automatically added by Firebase) to be the cause for the issue, however, other websites (such as Facebook) have HSTS yet don't encounter the same problem.