Home > Net >  A second site has been created in my Firebase project
A second site has been created in my Firebase project

Time:10-14

I am new to Firebase but I am the owner of a project.

I have also given permission to someone to be an "editor" of the project.

Initally there was only 1 site and URL for my project. In the hosting, I now notice that are 2 sites for the same project. One with the url mydomain.web.app and the other with mydomain-f9745.web.app.

When I deploy code it goes to the first domain and when the editor deploys it goes to the second domain. Can anyone explain what is happening here. It seems that when the editor deployed the code for the first time, it created a new domain instead of using the existing one.

I have also tried to see how I delete the second site but I don't see that option.

Can anyone explain why this second site it being created please?

CodePudding user response:

once you set up firebase hosting you're automatically allocated with a domain .web.app.

Seems, like mydomain-f9745 might be the one that is the default one.

Anyway, you can add more web.app domains to your project like mydomain.web.app.

I'm not sure about the difference you're saying between just "deploying" and "deploying from your code editor".

Note that you can specify the default site to be deployed to on your firebase.json file like this:

{
  "hosting": {
    "site": "my-site"
    /// other hosting config
  }
}

Just add a "site" property inside "hosting", and enter the site name (Do EXCLUDE .web.app).

Hope this helps!

  • Related