Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase default hosting domains: only .firebaseapp.com works but .web.app fails

I'm building a very simple one-page react application using typescript. I tried hosting it using Firebase Hosting. Surprisingly, only the domain [name].firebaseapp.com works but [name].web.app shows the "Site not found" default page:

site-not-found image

I am using a basic firebase config (the default one you get using firebase init):

{
  "hosting": {
    "public": "build",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ]
  }
}

I get the "Site not found" when I go on [name].web.app. I would have suspected something was wrong with the index.html, the rewrites, the build folder, etc... but then why would I see the page functional on [name].firebaseapp.com and hosted nicely and it should be?

There is a few things I suspect:

  • The domain name is not available from firebase itself (although why would firebase name the domain something that is invalid if that was the case when creating the project)
  • The files are being pushed to the [name].firebaseapp.com domain only (in that case, how can you control that?)
like image 408
Sableur Avatar asked Apr 13 '21 03:04

Sableur


People also ask

Which command is used for deploying a Firebase hosted application?

Many common tasks, such as deploying a Firebase project, require a project directory. We set up the project directory using the Firebase init command. The project directory is usually the same directory as our source control root. After running Firebase Init, the directory contains the Firebase.


1 Answers

Update:

I emailed customer support at firebase, and the next day the domain was working normally. No explanation was provided on why the issue occurred, but emailing them solved it.

like image 55
Sableur Avatar answered Nov 15 '22 10:11

Sableur