In my last post I praised Firebase Hosting for its speed and how easy I found deployments, however I completely neglected the fact that it doesn’t support email hosting. Almost two weeks after marking the switch I realised that my email was not working anymore (I know, I know, I should have figured it out earlier).
What Went Wrong
Short answer: I pointed my domain’s A-type DNS zone records directly to Firebase.
My email setup uses ghetu.net as a domain, with MX records pointing to Zoho Mail - this allows me to get 5GB of free storage while using a custom domain. Quite obviously, setting MX records requires a hosting provider that supports email, so when I pointed my domain to Firebase I made those MX records vanish into the abyss as well as all of my incoming emails.
How I Fixed It
The high-level solution came from the Firebase Google Group - using a hosting provider that does support email and redirecting just the http traffic to Firebase.
Instead of pointing the A-type DNS zone records directly to Firebase (from my domain name provider’s website), I switched them back to my old hosting provider (which supports email). Afterwards, from my old hosting provider’s cPanel, I removed the existing A-type records (which pointed http traffic to my old host) and added the ones provided by Firebase.
As a result, incoming http requests get sent to my old hosting provider which routes them to Firebase. Incoming mail requests also get sent to my old hosting provider which routes them to Zoho Mail. Happy days!