skip to Main Content

After running the command firebase hosting:sites:list I got the following result. My question is: Is it possible to remove the first row and set the third one as the default site because I got this error when I run firebase hosting:sites:delete myfrontend:

Error: HTTP Error: 400, Cannot delete default Hosting Site `myfrontend`.

This is because I don’t like the default URL, and I would like to change the default site ID to point to myfrontend-react instead of myfrontend? Forgiving me using fake data all the way.

✔ GitHub/Frontend/docs % firebase hosting:sites:list                                                        17:50:46

Sites for project myfrontend

┌───────────────────┬───────────────────────────────────┬───────────────────────────────────────────┐
│ Site ID           │ Default URL                       │ App ID (if set)                           │
├───────────────────┼───────────────────────────────────┼───────────────────────────────────────────┤
│ myfrontend        │ https://myfrontend.web.app        │ --                                        │
├───────────────────┼───────────────────────────────────┼───────────────────────────────────────────┤
│ myfrontend-jsdoc  │ https://myfrontend-jsdoc.web.app  │ some-id-here │
├───────────────────┼───────────────────────────────────┼───────────────────────────────────────────┤
│ myfrontend-react  │ https://myfrontend-react.web.app  │ some-id-here2 │
└───────────────────┴───────────────────────────────────┴───────────────────────────────────────────┘

Note: The data means that I have deployed both myfrontend-jsdoc and myfrontend-react.

2

Answers


  1. No, it’s not possible. Firebase provisions DNS entries by default using the name of your project exactly as you provided it.

    If you are serious about customizing the name of your site, you should register and connect a custom domain and set that up to point to your project.

    Login or Signup to reply.
  2. To do that you have a add a custom domain. First of all, you have to buy a custom domain from a domain service provider like Google Domains. and also there are many domain providers.
    There you can read about how to add a custom URL to Firebase hosting,

    https://firebase.google.com/docs/hosting/custom-domain

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search