0

I have added a site to firebase hosting and it is working fine when I navigate to site url without www. in it but when I try to redirect to the site with www. I get HSTS warning.

https://devkey.web.app/ This link is working fine.

https://www.devkey.web.app/ This (with www.) is throwing warning of potential risk.

This is how my firebase.json looks like:

{
  "hosting": {
    "site": "devkey",
    "public": "public",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  }
}

I know firebase automaticaly adds HSTS to all its hosted site and that's why I am getting this error but I do not want HSTS if it is not showing the site.

Please let me know how can I access my site at https://www.devkey.web.app/

I am an Android Developer not a web developer, so I really do not have much idea as what I should do.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Suraj Giri
  • 202
  • 1
  • 13

1 Answers1

0

https://devkey.web.app/ and https://devkey.firebaseapp.com are the only link for your Firebase Project.
Firebase had never been giving www for default link. To use www, you will need to buy a domain and connect it to your Firebase Project.

If you need a free domain, you can get it at Freenom https://www.freenom.com/ which provide only five free TLD.

CHOO YJ
  • 151
  • 2
  • 5
  • 24