Link to home
Start Free TrialLog in
Avatar of Aaron Burgess
Aaron Burgess

asked on

Godaddy DNS redirect to AWS, screws up my mail server...

How do I get my godaddy domain name to direct to my amazon instance (web hosting) without screwing up the MX redirect?
Avatar of Dr. Klahn
Dr. Klahn

As a long-term solution, though it is not simple, I suggest using dynamic DNS through one of the services such as dynu.  Amazon can then switch you to a different server or different IP address around every hour if they feel like it;  you're still online.  Same goes for moving your site to a different hosting provider; you can be up and running in ten minutes on a new site with no DNS setup.

  • Register with a dynamic DNS service.  I use dynu; there are others.  Paid is not necessarily better than free.  Set both www.domainname.tld and domainname.tld
  • At your domain registrar, set your domain's DNS A record to point at the dynu servers.
  • Install ddclient on the linux host.
  • Configure ddclient on the linux host with the domain name, username and password at dynu.
  • Restart the linux host or start the ddclient service.
  • Within 30 minutes the DNS address should percolate through to the TLD servers.

Note that when A and MX records resolve to different IP addresses, some email trouble can be expected.  Not a great deal of trouble, but a little.  A few MTAs (possibly due to misconfiguration) appear to ignore MX records and send to the target sitename instead.
The web site requires an A record or a CNAME record.
Assuming that your domain is called "example.com", what you may have today are MX records pointing back to your root domain.  

example.com  A  123.123.123.123
example.com   MX   example.com

What you have to do:
a. Start an AWS instance
b. Get an elastic IP and associate it with the instance. Lets assume that you got 54.55.56.57
c. Create a new A record in Godaddy DNS, call it "mailserver.example.com" and point it at 123.123.123.123
d. Change your MX to point at mailserver.example.com
e. Change your apex A record to point at 54.55.56.57

You need an elastic IP because by nature of the cloud, you will want to change instances and keep a stable, constant IP address.

Old MTAs had problems with different MX and apex A records, but frankly, last time I saw something like that was in 2001. I have worked with literally thousands of domains in the past years, and never had any problems.
Avatar of Aaron Burgess

ASKER

I did this, but when typing in the domain, it just goes to a white screen. nothing else
Can you please share the domain?
bncicomputers.com
SOLUTION
Avatar of Prabhin MP
Prabhin MP
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial