Search code examples
firebase-hosting

Firebase Custom Domain: What happen to old domain after that?


When I just started exploring Firebase, I referenced many of the assets hosted on it, such as JavaScript files, images, and CSS from my production site. Now I realized that I should create a Custom Domain for my Firebase hosting site if I were to turn it into an official app eventually. But my concern is: Will all the links on my production site become broken? For example, images no longer load, JS no longer work etc.? Will Firebase auto-redirect to https://new-subdomain.mycompany.com/images/thumbnails.png when referencing it with:

<img src="https://my-id.firebaseapp.com/images/thumbnails.png" alt="thumbnail" />

Fixing the URLs to these assets will be very tedious because I have too many of it. Any advice? Thanks!


Solution

  • my-id.firebaseapp.com will continue to work just as it did before even if you add new-subdomain.mycompany.com as a custom domain to the my-id.firebaseapp.com Firebase project.