How to Set Up a Custom Domain and Get a Free SSL Certificate on Firebase
In my previous article, I showed you how to deploy your project to Firebase and use it for free. Now, let's explore additional benefits of Firebase. In the upcoming article, I will show you how to set up a custom domain name for your project and utilize a free SSL certificate from Firebase.
I assume you have already read my previous article. If not, it's better to start from there. Before you can set up a custom domain name for your Firebase project, you need to purchase a domain name. There are many places where you can buy a custom domain name, such as:
It doesn't matter which company you choose, as all of them will work with Firebase.
How to Set Up a Custom Domain for Firebase Hosting
First, you need to log in to your Firebase account and go to the console at https://console.firebase.google.com/.
Then, select the project that you have created earlier or create a new one.
In the left navigation bar, choose 'Build' and then select 'Hosting' from the dropdown menu.
In the new window, click on the 'Add custom domain' button.
In the modal window, enter the name of your custom domain and click 'Continue'.
In the next step, you will receive a TXT record that you need to add in the control panel of your custom domain provider (DNS provider). For example, if you are using GoDaddy, you can follow this tutorial: https://www.godaddy.com/help/add-a-txt-record-19232.
Once you have added the record, click 'Verify'.
Please note that it may take up to 24 hours for your domain to be fully resolved.
How to Get a Free SSL Certificate for a Custom Domain on Firebase Hosting
To get a free SSL certificate from Firebase, you don't have to do anything. Yes, that's correct! You don't have to do anything else!
Once you add your custom domain, Firebase automatically adds an SSL certificate to it. It's a basic certificate but sufficient for a simple project.
Keep in mind that it could take up to 24 hours to issue the certificate.
As you can see, Firebase is not only a simple and fast solution for your project but also comes with free perks that can be very useful for startups or small projects.
If you liked my article, please share it with your friends. It motivates me to write more useful stuff.
Thanks! And see you in the next article soon. ;)