Search code examples
amazon-web-servicesdnsmail-server

aws email server setup same domain


1.I have a domain name in namecheap.com.
2.I have servers, including a web server, and an email server on amazon.
3.My web server and email server have 2 different IPs.
4.But I only have one domain, lets say www.abcde.com.
5.I was able to setup the NS, and the "A" correctly in away that www.abcde.com points to my web server.

When visitors go to url www.abcde.com I want them to go to the web server.

How do I setup an email server so that email that goes to admin@abcde.com points to the email server?


Solution

  • You need to add an 'MX' DNS record pointing at a CNAME record which points the mail server's IP. Also, it needs a number indicating the 'preferred' server. If you only have one, then this number doesn't matter.

    So, you want an MX record like:

    MX mail.example.com 10

    And a CNAME record like:

    CNAME mail.example.com which points to x.x.x.x