I'm using DNSimple for managing my records, hosting my site at Heroku and I want to use a Linux WHM (cPanel) for managing emails forwarding.

Hosting works, but I'm having a hard time getting emails to work. Here are my (pseudo-)records:

Type    Name                TTL    Points to
ALIAS | mydomain.com      | 3600 | mydomain.herokuapp.com
CNAME | www.mydomain.com  | 3600 | mydomain.herokuapp.com
CNAME | mail.mydomain.com | 600  | <WHM server IP address>
MX    | mydomain.com      | 600  | <WHM server IP address>
NS    | mydomain.com      | 3600 | ns1.dnsimple.com
...   | ...               | ...  | ...
NS    | mydomain.com      | 3600 | ns4.dnsimple.com

There are two more records, SOA and TXT, generated by DNSimple, but I don't think those are relevant. When I add an A-record:

A | mydomain.com | 3600 | WHM server IP address

and change the mail CNAME and MX records to mydomain.com, emails start working, but then the hosting doesn't work anymore.

Is this possible to achieve?

2 Answers 2

MX    | mydomain.com      | 600  | <WHM server IP address>

The MX record should point to a fully-qualified host name, not to an IP address. The same applies to a CNAME. In fact, it's quite common to create a mail.example.com hostname (either an A record pointing to the mail server IP or a CNAME that aliases an existing hostname pointing to the mail server IP) and point the MX record there.

You should check what is the IP of the mail server, create an mail.mydomain.com A record that points to that IP, then update the MX record with that hostname.

  • I added an A-record A | mail.mydomain.com | 600 | <WHM server IP address>, then I removed that mail.mydomain.com CNAME record, and I directed my MX record to mail.mydomain.com instead of that IP address and it worked! I will mark this as correct once I'm certain everything works.
    – silvenon
    Jul 1, 2013 at 11:23

You used a CNAME for the naked domain, which overrides any other record. I'm quite surprised DNSimple actually accepted this, since it's not really a workable configuration.

The naked domain should point to a server which does nothing but send a 301 redirect to www. which is pointed at Heroku.

See Why does Heroku warn against “naked” domain names? for the reasons why this situation exists.

  • I'm not sure I understand. Are you referring to the ALIAS record? Should I use an URL record instead which redirects to the www record?
    – silvenon
    Jun 29, 2013 at 0:15
  • 1
    Anyway, ALIAS is what DNSimple automatically creates when connecting to Heroku, so I think it's legit, because it's not CNAME.
    – silvenon
    Jun 29, 2013 at 8:54
  • As @matija explained, he's not using a CNAME but an ALIAS, that is a special DNSimple feature that maps the rood domain to an A record. Jul 1, 2013 at 8:14
  • Ohhh, that's almost as bad. "ALIAS" is certainly not a standard DNS record. Jul 2, 2013 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.