You need a DNS service like dnsmadeeasy or others mentioned in heroku . From there you need to distribute different records, for example. ANAME and CNAME for the hero, CNAME for external resource hosts such as cloudfront, MX (and A) for sending email to the host.
I myself in the process of working with the "email problem":
(simpler) The registrar (domain name provider) offers mail hosting, but does not offer ANAME or ALIAS records (shared): you can specify the name servers to DNS and then send an email back to your registrar. Found registrars are very useful in general, helping if you need configuration data.
( ) re nameservers ( , , ). . ? .
() ANAME ALIAS . , !