Search code examples
amazon-web-servicescpanelweb-hostingshared-hosting

cpanel hosting emails not working with AWS DNS servers name


info: i have two hosting server one is on skyhost.com and the other is on AWS Lightsail. skyhost is a cpanel hosting where i register my domain name and my emails accounts. My website is hosted on AWS Lightsail with the domain. my website is contain the domain which is register on skyhost. The website is working fine because AWS DNS are propagated with domain which is register on skyhost.

Issue: But the email [email protected] are not working (sending or receiving). I am not able to login the accounts since i host my website on AWS because i don't understand how can i add DNS records in Lightsail AWS of skyhost for mail exchange or something else...

example: (65.91.30.99) that is the ip of cpnel skyhost. staticip-1 that is a AWS server ip

enter image description here


Solution

  • To keep it simple, the MX records do not point to IPs.

    You will need to set the sub-domain to the naked domain example.com or "@" in some cases. (I have not used the light sail DNS console before)

    But you then set up the "Maps to" as mail.example.com and then create an A record for mail.example.com to point to 65.91.30.99

    This is how basic DNS routing works for email.

    More info here: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-how-to-create-dns-entry