'Is it possible to change the subdomain on a free Firebase app?
For example, I have set up a free developer account and have my database on the url:
example-name-123.firebaseio.com
Is it possible to change the 'example-name-123
' piece of the url? If yes, how?
I'm aware I can always buy a domain name and host firebase on that URL but I was wondering if this was an option.
Many thanks for your time!
Solution 1:[1]
Any user (account) on Firebase can have up to 10 apps on a free/developer plan. Each app has a unique name and comes with database/authentication (available on https://<app-name>.firebaseio.com
) and hosting (available onhttps://<app-name>.firebaseapp.com
).
When you create a Firebase account an initial app is created for you, with a name in the format glorious-firename-1234
. So with that app you'd have https://glorious-firename-1234.firebaseio.com
and https://glorious-firename-1234.firebaseapp.com
.
But you can also create your own app with a more memorable name, such as lazytotoro
. This would lead to https://lazytotoro.firebaseio.com
and https://lazytotoro.firebaseapp.com
. This is available for free apps.
You only need a paid app, if you'd want to switch to https://www.lazytotoro.com
or something like that.
Solution 2:[2]
Once a project is created, you can't edit its project-id
. The project-id
is the default site name of hosting. To get different site name:
You can set another name than that of provided by firebase console at project creation time. So, you can edit the suggested project name, for eg,
example-name-123.firebaseio.com
to likemy-web-app.firebaseio.com
One project can have multiple sites. Go to https://console.firebase.google.com/project/{your-project-id}/hosting/sites and click
Add Another Site.
You can give a new name to your new site (even if you can't edit name of existing!) You can read here for more
Now, Firebase launched web.app domains for all of the sites hosted on Firebase Hosting your site can also be accessed via my-web-app.web.app
in addition to my-web-app.firebaseio.com
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Frank van Puffelen |
Solution 2 | Dr.jacky |