问题
I have a firebase project that loads properly unless I type the url to my project with www.
in front.
This works:
https://myproject.firebaseapp.com
This returns an error:
https://www.myproject.firebaseapp.com
Your connection is not private
Attackers might be trying to steal your information from www.myproject.firebaseapp.com (for example, passwords, messages, or credit cards). Learn more NET::ERR_CERT_COMMON_NAME_INVALID
Attempt to resolve
- I followed the "Learn More" in the error above and it seems that
the error might be that firbase by default sets up
myproject.firebaseapp.com
but notwww.myproject.firebaseapp.com
. - I then checked the firebase app in the hosting console (i.e. https://console.firebase.google.com/project/myProjectNameHere/hosting/main)
and it does show only the non-
www
version, but adding thewww
version here does not seem possible since I do not own thefirebaseapp
domain so I cannot add the provided TXT file at this point to the DNS records.
Does anyone know why this is occurring and how to get the project to load when www.
is added to the url?
Thank you in advance!
回答1:
This is not supported.
To give some technical detail, wildcard SSL certificates are only valid for a single level; so *.firebaseapp.com
but not *.*.firebaseapp.com
. In addition, this is (in my estimation) entirely unnecessary as it simply makes the URL longer.
What I would encourage you to do is purchase a domain name for use with your Firebase Hosting site, and connect it. Read "Connect a Custom Domain" in our docs for more info.
来源:https://stackoverflow.com/questions/46005261/error-from-firebase-project-url-adding-www-causes-your-connection-is-not-priva