DEV Community

Cover image for Firebase Hosting with Namecheap Domains

Posted on

Firebase Hosting with Namecheap Domains

Firebase Hosting, in my opinion, the easiest and beginner friendly way to host your website seamlessly. I haven't tried other hosting services (except Heroku). If you have one, comment down below!

However, when you deploy your web project the firebase hosting, you will the get a default url:

That's when domains come in. In short, domains are the addresses of your projects. They convert the human readable address to an ip address that your web project is being stored.

You can buy domains from GoDaddy, Google. However, I chose NameCheap because I am a cheapskate. I find that registering your NameCheap domain with firebase hosting is not exactly great. Thus, this a brief tutorial on it. Full video below.

First, you need to get a domain name in NameCheap.

Second, go to the Firebase Hosting of your project. Click on add custom domain and key in your custom domain. Leave the checkbox that says redirect to an existing website, unchecked. Click continue.

Copy the statement below the value header: google-site-verification=somethingsom4eth6in7g

Let's go to NameCheap dasboard. you need to go to Domain List > Manage Click on the domain you want to register > Advanced DNS > Add New Record.

Namecheap Dashboard example

Source: Macario Jame

Create an TXT Record, with a @ as host, instead of the url as the host.

Moreover, create a CNAME record with www as the host and the value with your domain.

This will be verified after a couple of minutes. You are one step away from using your custom domain.

Success Dialog for Firebase Hosting Domain

Once done, you will be brought to the last page, GO LIVE. You have to add 2 A Record with the host @ instead of your custom domain into the Advanced DNS settings.

You have to wait for a while for the domain to be secured by Firebase. Refresh the page after a few minutes, and you will see the Pending status.

You can visit your web app, which is not secured, yet.

It may take up to 24 hours, but it will probably take less.

Hope this is helpful ūüėĀ. Comment down below if you face with any issues.

Top comments (6)

piotrp10711450 profile image
Piotr P

Thanks, I have struggled to get working. There is a bunch of videos taking about cName configuration and stuff, but none of them really worked for me.

Now guided by your vidieo, I've created two separate connections with my domain now and it's flying.

Once more thanks.

wilsontov profile image
Wilson Tovar

You saved my life! Thank you!

krishnakakade profile image
krishna kakade • Edited

Worked but still needs setup maybe soon it will be verified

sitonimbus profile image
Carlos Andrés Mora González

You saved my life! Thank you! This is awesome!

rextech03 profile image

Happy your contents makes me happy. Thanks happy for your happy content

geovannygil profile image
Geovanny Gil

Thank you friend