Search code examples
firebasefirebase-hosting

Firebase hosting with a custom domain name still uses 'xxx.firebaseapp.com'


I have followed all the instructions to add my custom domain name to my Firebase app.

I now have 3 domains.

  1. The firebaseapp.com domain is flagged as Default (there is no way to change this setting) or delete this domain

  2. example.com - is connected

  3. www.example.com redirects to example.com.

That is all fine, except when you type in the firebaseapp.com address- it shows my website content. If that address cannot be deleted, then I need it to redirect to example.com.

I saw other posts that recommend adding:

<link rel="canonical" href="https://example.com/" />

I have tried this but it makes no difference.

How do I get rid of the firebaseapp.com domain from my website, or redirect it to my domain name?


Solution

  • Firebase Hosting will always serve content from the shared domain, there is presently no way to disable it. The <link rel="canonical"> suggestions will prevent search engines and crawlers from indexing the content on the shared domain.

    I'd recommend filing a feature request if you'd like to see different functionality there.