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?
Aaron BurgessAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dr. KlahnPrincipal Software EngineerCommented:
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.
Shalom CarmelCTOCommented:
The web site requires an A record or a CNAME record.
Assuming that your domain is called "", what you may have today are MX records pointing back to your root domain.  A   MX

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
c. Create a new A record in Godaddy DNS, call it "" and point it at
d. Change your MX to point at
e. Change your apex A record to point at

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.
Aaron BurgessAuthor Commented:
I did this, but when typing in the domain, it just goes to a white screen. nothing else
Defend Against the Q2 Top Security Threats

Were you aware that overall malware worldwide was down a surprising 42% from Q1'18? Every quarter, the WatchGuard Threat Lab releases an Internet Security Report that analyzes the top threat trends impacting companies worldwide. Learn more by viewing our on-demand webinar today!

Shalom CarmelCTOCommented:
Can you please share the domain?
Aaron BurgessAuthor Commented:
Prabhin MPEngineer-TechOPSCommented:
Hi ,
Set @ record to your AWS instance IP.
Make sure that always you have elastic IP.
Shalom CarmelCTOCommented:
Looks like there is something wrong with your code or web server setup.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.