Today I would like to talk about the CNAME record needed to use your own domain on Heroku.

If you want to use Heroku to host your website while using 1&1 as a domain provider you might encounter some issues like not to be able to use a custom email address like foo@yourdomain.com.

On their documentation page, Heroku asks you to create a CNAME record pointing the subdomain to your app’s Heroku herokuapp.com hostname.

Something similar to this:

Record

Name

Target

CNAME

www

example.herokuapp.com.

Pretty easy right? Yes, only if you don't use any of the services 1&1 provide. In my case, I use also 1&1 to have a custom email address as explained earlier. In this case you have to do more that just creating the CNAME record.

On Wikipedia, you can find this:

An alias defined in a CNAME record must have no other resource records of other types (MX, A, etc.).