Random Alper

Hosting on Heroku with functioning MX records

It seems to be not completely obvious how to host a website on heroku while at the same time also maintaining e-mail delivery. You would think that this is a very common situation and it would be well documented but unfortunately it is not.

We got a DNSimple account because that’s the way that heroku allows naked domains to function. DNSimple sets up the ALIAS record for you rather easily, but what it doesn’t do is warn you if you have both MX and CNAME records on something. What happens is that the CNAME record always takes precedence as a redirect so your e-mails are then routed to proxy.heroku.com. Something that is undesirably and that DNSimple should warn against.

What turns out to be the best solution is to set ALIAS records for both your apex domain and your subdomains (as proposed here). This way you don’t need a CNAME record anymore that can interfere with other settings. Heroku in their documentation advise you to use a CNAME record, so I’m going to ask them if there are any problems with using an ALIAS for all web routing.

The other option would be to purchase another plan for Zerigo which seems to be heroku’s preferred solution for this issue right now. Again this is rather poorly documented and we would have liked to be informed about that before we chose for the DNSimple option.



via Alper.nl » English http://bit.ly/VuRQzu