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?

已提问 2 年前891 查看次数
1 回答
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
专家
Toni_S
已回答 2 年前
  • 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}.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则