Search code examples
firebase-hosting

Can I deploy a firebase preview channel to my custom domain?


I have a custom domain setup in firebase hosting that works fine. When I create a preview channel though it always creates it at the default "web.app" domain. I tried just replacing "web.app" in the preview channel url with my custom domain but got a site not found error. Does anyone know if it's currently possible to deploy a preview channel to a custom domain configured in firebase hosting?

Example: The preview channel is: https://project-id--channel-name-8rdxche4.web.app, and I want it to be https://project-id--channel-name-8rdxche4.my.domain

This is because my frontend project is hosted in Firebase, but my backend is on my own server that is also under my custom domain. So for cookies to be set properly I need the preview channel to be hosted from the custom domain too.


Solution

  • It is not possible at the moment and I don't think it will be possible in the future, as Firebase would need to connect to the APIs from your domain provider to create temporal subdomains.