The setup was this: a domain, registered at Domaindiscount24 ( as the DNS hoster, and set up there so that there was an “IN A” record pointing to the Hostgator server’s IP address, and a “IN MX” record containing “10” (with 10 being the priority). On the Hostgator server, the domain was registered for webspace (and this worked), and a mail forwarder to another domain (also hosted on Hostgator) was set up, but no e-mail accounts for

The exact same style of setup worked for e-mail for another domain, also at DD24 and Hostgator, for which webspace and a mail account was set up.

However, in this case, the mail forwarder for the address did not work: mails did not get forwarded, except if they were sent from another domain that was hosted on the same Hostgator server. The mails also did not appear in the customer-wide spam folder, and no error message was sent back to the sender (which effectually means that the mail was lost). It seems also that sometimes, the forwarding is successful, for whatever reason.

The error might be: before forwarding, according to the DD24 entry, the mailserver of has to be contacted. But there might be a bug on Hostgator’s server configuration that only creates such a server when a mail account (not a mail forwarder) for this domain is created. The strange thing is however, that the mail senders do not receive errors back when sending to addresses. Which might be because the Hostgator server accepts such mails in a kind of catchall address, but cannot distribute them to the different customers hosted on that server as it does not know what domain belongs to what customer.

The workaround for this error (tested successfully) is to set up e-mail forwarding (at best, with a wildcard) directly at the DNS hoster (here, DD24). This change takes effect on DD24 in a few minutes, but because of the DNS cache times it propagates for use in normal mail software only in 4-7 days. You can see that by the difference in the output of the following commands:

dig MX
dig MX

If both contain something lilke “ 28800 IN MX 10” (and a second line like it), the change is complete. This happened in the current case some 4-6 hours after doing the change in the DD24 admin area.
This however leaves one problem untreated: when sending a message to from a domain that is also hosted on the exact same Hostgator server as, the SMTP agent on that server that has to send this message seems to think that it is also the MX server for, does not find the specified target mailbox, and subsequently returns an error message to the sender: “Mail delivery failed: returning message to sender. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: No Such User Here.” This is again a DNS routing bug on the Hostgator servers, because a MX record must be used if it is present, as it is here, according to RFC 5321 sec. 5 ( The workaround is to go to the Hostgator e-mail administration tool and re-enable a mail forwarder * to a target mail address, which will take effect only for mails dispatched by the SMTP agent on that server.

This last step of adding an e-mail domain forwarder (from * to a target address) has the added advantage that using an mail address as the From address becomes now possible, whereas else, the SMTP client on the Hostgator server would reject sending such mails.

One thought on “How to fix the problem with Hostgator (Webhosting, Baby Plan) that mails do not arrive at a domain for which only mail forwarders are set up?

  1. Thanks for this article, it was exactly the problem I was having. Saved me an hour of further messing around.

Leave a reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

This site uses Akismet to reduce spam. Learn how your comment data is processed.