In the previous tutorial, I showed you how to host a web application by using Firebase Hosting. But Firebase just gives us their own domain to connect to our application. In this tutorial, I gonna reveal to you how to connect a custom domain to Firebase Hosting

Register new domain

Select “My domain” from the menu

  • Choose a name for your domain

Select a free one:

Checkout your selected domain:

Complete order:

After complete your order, now you’re the owner of that new domain

Connect new registered domain to Firebase:

  • Access firebase project overview, choose “Hosting” and click on button “Connect domain”

  • Input your custom domain you have just register successful
  • Copy the value for DNS record:

After this tep. Move back to Firebase browser tab and click “Verify” button

If you get the error message, please wait several minutes and verify again, because it takes time to update DNS record. Try to verify many times until you are successful

When verification is successful, Firebase gives us 2 DNS records. We need to copy these value and paste it to our domain DNS

When we finish update DNS record, try to access our domain in a browser and check the result (Maybe we need to wait some hours for our changes take effect)

Remember that in the first time, we will get the warning for the invalid certificate, don’t worry Firebase will help us to deploy a valid one some hour later. At this time just try to proceed with unsafe

Result will be look like this:

We’re now successful to connect our custom domain to Firebase hosting.

Final words

In this post, I have just shown you how to register a free domain as well as connect it with current Firebase Hosting. In the next post, I gonna show you how to deploy a React application and deploy it to Firebase. See you later!

2 Comments

  1. Pingback: TOEIC Test – Part 3 Setting up React project » Frontend development

  2. Pingback: TOEIC Test – Part 4 Setting up CI/CD workflow » Frontend development

Leave a Reply

Your email address will not be published.