I just set up new Firebase Hosting and my custom domain and my web page, etc...
Everything works great, except what is really bothering me are default Domains:
projectname.web.app
projectname.firebaseapp.com
Looking around googling, I have not found a solution, how to remove or disable them... Any suggestion? This seems really annoying. It could be a show stopper for me...
Make sure that you've completed the "Get Started" wizard from your project's Firebase Hosting pageso that you have a Firebase Hosting site in your Firebase project. Step 1: Add domain From your project's Hosting page, enter the wizard for connecting a custom domain: If you have only one Hosting site, click Connect domain.
Run firebase hosting:disable through the firebase-tools CLI first. Go to Firebase Console and select Hosting from the menu of the left. You will see the deployed project with a list of your historical actions like Deployed, disabled, etc.
For serving your content, Firebase offers several domain and subdomain options: By default, every Firebase project has free subdomains on the web.app and firebaseapp.com domains. These two sites serve the same deployed content and configuration.
Go to Firebase Console and select Hosting from the menu of the left. You will see the deployed project with a list of your historical actions like Deployed, disabled, etc. Only after you have disabled the site, the "three vertical dots" menu will be available for you to choose the action to delete the deployment.
I have contacted Firebase Hosting help. According to them, you can not disable, remove, hide or make them private. Meaning they will always be there and be accessible to the public...
Their official answer;
<link rel="canonical" href="http://myapp.domain.com/" />
However, this did not work for me out of the box. I asked Google to re-index my web page (still waiting at this point to re-index).
//check if the url
if (window.location.hostname == "yourapp.web.app" ||
window.location.hostname == "yourapp.firebaseapp.com") {
window.location.href = 'http://yourcustomdomain';
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With