Newbie here. CNAME vs Alias

0

I have a Domain say "www.example.com" which is hosted on Salesforce. I have a CNAME (www) record that points "www.example.com" to Salesforce Host Server. I do not have a IP address, so no 'A' Record. So far, it all works fine. The problem is "example.com" (naked domain) is a dead end for users. I was wondering that I could use Alias record that points "example.com" to "www.example.com". So to say both "example.com" and "www.example.com" both should point to the same Salesforce Host Server. But I see a note that got me confused.

URL: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-choosing-alias-non-alias.html Paragraph: Unlike a CNAME record, you can create an alias record at the top node of a DNS namespace, also known as the zone apex. For example, if you register the DNS name example.com, the zone apex is example.com. You can't create a CNAME record for example.com, but you can create an alias record for example.com that routes traffic to www.example.com (as long as www.example.com doesn't already have a CNAME record).

My confusion - "(as long as www.example.com doesn't already have a CNAME record)" got me offtrack. CNAME record for www.example.com has to exist, right? Along with CNAME if I also create a ALIAS record will that not solve my problem?

asked 2 years ago873 views
1 Answer
1

Alias record can point to other Route53 or AWS resources but not to external DNS names or IP addresses.

What is meant by that "as long as..." is that the www.example.com record cannot be type CNAME but should instead be any other type of record such as A record pointing to an IP address or to an AWS resource.

profile pictureAWS
EXPERT
Toni_S
answered 2 years ago
  • Hi Toni. Thanks for your response. Can you explain this with an example? As I said, I am a newbie.

    I am working with a Domain and External Hosting Server only. Not with an AWS resource or an IP address. Is this possible?

    1. CNAME record: www CNAME pointing to Salesforce.XXXXXXXXXX.XXX.XX (Host Server)
    2. Alias record: 'A' record using the Zone APEX {DomainName.com} pointing to www.{DomainName.com}.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions