This question already has an answer here:
I currently have an existing domain for a large company. We are using a service to manage our DNS.
We had an existing domain with many subdomains, with a legacy website.
Recently we wanted to update our website, we did so by developing it on AWS and getting it really good.
We now need to update the DNS configuration.
This existing configuration looks something like this
- A mydomain.com [original ip]
- MX mydomain.com [original link to mx setup for mail]
- TXT mydomain.com [mx extensions for mail]
this setup points to office 365
now I needed to update this, so my first thought is add a CNAME record
CNAME mydomain.com [point it to ELB in aws]
this works and my site is now live.
the mail servers are now broken.
Then I tried removing the CNAME and adding
CNAME www.mydomain.com [point it to ELB in aws]
this works, both with the website and mail but is a bad experience for our users
what I want to do is not damage the original setup and still have
CNAME mydomain.com redirect to my new website
and not have our mail servers breaking.
Is there a way to do this? Its really painful for our users to have to type wwww.mydomain.com and most people won't do it and we are losing users.
how can I have my basedomain with a cname record and have it not override the other records? I know the short answer is it will, but I need a work around to achieve the business result I need, any thoughts?
This is my ideal setup
- A mydomain.com [keep it as it was]
- MX mydomain.com [keep it as it was]
- CNAME mydomain.com [point it to new website]
- TXT mydomain.com [keep it as it was]
- CNAME www.mydomain.com [point it to new website]