How to get free hosting for website builder from firebase (google)

Deploying Website with Firebase Hosting

Deploying Your Website with Firebase Hosting

Prerequisites:

  • A Gmail Account for Firebase sign-in.
  • Node JS for installing Firebase CLI.
  • Your static website files ready for deployment.

Step 1: Creating a New Project and a Web Instance in Firebase

  1. Visit firebase and sign in with your Gmail account.
  2. Go to the console and create a new project with a name of your choice.

Step 2: Open the Website in an IDE

Open the folder containing your website's files in an IDE (e.g., VS Code).

Step 3: Register App

  1. Click the "Web" button to create a web instance for your project.
  2. Provide a name for your website, select 'Also setup Firebase Hosting', and register the app.

Step 4: Add Firebase SDK

Copy the provided code snippet and paste it into your website's home page.

Step 5: Installing Firebase CLI

  1. After adding the script, go back to Firebase and proceed.
  2. Run the command npm install -g firebase-tools in your terminal to install Firebase CLI.

Step 6: Deploying to Firebase Hosting

  1. In Firebase, you'll find commands to deploy your website.
  2. Copy and paste each command in your terminal to execute.
  3. Start with firebase login to authenticate.
  4. Run firebase init and configure Firebase Hosting for your project:
    • Choose Hosting: Configure and deploy Firebase Hosting sites.
    • Select an existing project.
    • Choose your web instance.
    • Set your public directory (default is 'public').
    • Type 'y' to rewrite URLs to index.html.
    • Move your website files to the public directory.
  5. Finally, run firebase deploy to deploy your website.

Final Thoughts

After the deployment is complete, you'll receive a hosting URL where your website is live.

Comments