Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase hosting causing insecure connection via www

I'm using firebase hosting for my website. If I visit my website by typing just the domain in the address bar (eg example.com) or https://example.com, it works fine. However, if I were to add a prefix www (eg www.example.com or https://example.com), then I get an insecure connection error. Is there any way to fix this? Thanks

like image 719
fatffatable Avatar asked Feb 12 '17 09:02

fatffatable


People also ask

How do I set up a Firebase Hosting project?

The Firebase CLI makes it easy to set up a new Hosting project, run a local development server, and deploy content. Add your static assets to a local project directory, then run firebase init to connect the directory to a Firebase project.

How to add a custom domain to Firebase?

Click on the add custom domain button. A form will appear like this, asking you to add the domain. Add the domain you have bought and click continue. As both the firebase and domain registrar was Google’s products, we don’t need to verify the ownership of the domain to the firebase.

What happens if I run Firebase init again?

Caution: If you run firebase init again and select Hosting, the command will overwrite the hosting section of the firebase.json file back to the default configuration. You can find a full firebase.json configuration example (covering only Firebase Hosting) at the bottom of this page.

Can I host microservices on Firebase?

You can also pair Firebase Hosting with Cloud Functions or Cloud Run to build and host microservices on Firebase. The modern web is secure. Zero-configuration SSL is built into Firebase Hosting, so content is always delivered securely.


1 Answers

I just realised that you have to add both example.com and www.example.com to your site in the Firebase Console.

Thanks

like image 180
fatffatable Avatar answered Nov 15 '22 10:11

fatffatable