Search code examples
firebasefirebase-hostingnamecheap

Firebase CDN with Namecheap DNS: Site won't load with "www" prefix


I've been learning how to use Firebase hosting to host Angular apps, but I've been struggling with this DNS issue for over a week now and have had no luck solving it. I have an simple Angular(v7) web app hosted on the Firebase CDN. When I navigate to my site without the "www" prefix (https://howmuchhouse.org/) it loads just fine, but when I add the prefix "WWW" (https://www.howmuchhouse.org/) I get the following error:

Site Not Found Why am I seeing this? There are a few potential reasons:

You haven't deployed an app yet. You may have deployed an empty directory. This is a custom domain, but we haven't finished setting it up yet.

This is my Namecheap setup enter image description here

And on firebase hosting it shows as "connected" enter image description here

I've gone over all the Firebase and NameCheap documentation and come up empty handed. This is my first time ever hosting an app so I may be not using the right terminology in my searches. I also looked at a few StackOverflow posts regarding similar issues like this post and this post. Any help or ideas would be very much appreciated!


Solution

  • Your screenshot shows that you have howmuchhouse.org connected to your Firebase app. You also need to connect www.howmuchhouse.org from within the Firebase console and have it redirect to the non-www version. The Firebase config should look like this:

    enter image description here