0

Good day,

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.

BUT

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]
Elixir
  • 101

2 Answers2

2

No, it's not possible as CNAME can't co-exist with any other records (RFC 2181, 10.1; RFC 1912, 2.4), including your A, MX, TXT, the only exception being DNSSEC related records (RFC 4035, 2.5). Also, and even more importantly, it can't co-exist with NS, making it impossible to be used for the domain itself.

Add only the www.example.com. CNAME and arrange HTTP redirect on what ever the example.com. A points to.

Esa Jokinen
  • 52,963
  • 3
  • 95
  • 151
-1

You cannot have your base domain with a CNAME together with other records.. but you dont necessarily need that:

While just a commercial service - not part of any official standard or available with a huge amount of DNS hoster (though available at some huge ones) - there exists a mechanism for precisely that use case.

Typically called something like ALIAS (e.g. Route53) or ANAME (e.g. DNS made easy, name.com, easydns) and configured by means similar to standard records, the DNS hoster offers to create/update standards-compliant A/AAAA records in your zone, which will then match your configured target domain.

An ANAME record is like a CNAME record, but at the root level.

anx
  • 10,888