This article covers following topics related to firebase hosting.
- What is Firebase hosting ?
- Is Firebase hosting free ? yes it is free.
- Firebase hosting custom domain.
- Firebase hosting using nodejs CLI
- Firebase connect with goDaddy domain.
Firebase hosting allows you to deploy your static web apps for free. I will show you how to deploy your website on firebase using node.js. I will also guide you How to update/ re-deploy your webiste on firebase. After deployment you will get firebaseapp.com sub domain. But firebase allows you to connect your website with your custom domain name parked anywhere. my domain was parked at go daddy so I will show you how to connect with go daddy domain.
In this tutorial I will teach you how to host your web application to firebase hosting server using node js. I will also teach you how to connect your domain with firebase.
Step 1: Download node.js from this Download link
Install it and open command prompt and type command
npm install -g firebase-tools
After installing Firebase tools.
Step 2: Go to Firebase console and create a new project.
Step 3: Create a folder named “public” and place source files in public folder.
Step 4: Open command prompt and change path parent folder of public directory (not inside public folder where your website files are)
Step 5: Now login to Firebase from command prompt using this command. it will authenticate your Firebase account.
Step 5: Make sure you are pointing a right directory. a directory which has public directory and public directory should have index.html file (your website files)
we have initialized our project in this directory.
Type public when it asks you about public directory (it should have index.html file). like in below screenshots.
Type No for all options after this step. when initialization is complete
After your website is deployed you will get project url and your web application default hosting URL.
Now we will connect our website hosted at firebase with custom domain. my domain is parked at
goDaddy so I will show you how to connect firebase website with goDaddy domain.
Select Connect Domain from firebase console. and type your domain. After that you will get TXT record and 2 A type records.
Go to your goDaddy account and Manage DNS section and remove existing records of type TXT and A type. and add records given by firebase.
Firebase server will verify your domain parked at goDaddy. if everything goes well your website will be connected with custom domain.
If ever you want to update your website content on firebase.
and your website will be updated on firebase.
If ever you want to go back to previous version of your website. you can roll back changes.