AZ-104 Question 235
Single answerYou have a custom domain named contosostorage.com and an Azure Storage account named contosostorage that hosts a static website. You need to configure Azure DNS so that contosostorage.com automatically resolves to the static website endpoint without manually updating IP addresses if they change. Which DNS record should you create?
- A
Create an A record pointing to the public IP address of the storage account
- B
Create a CNAME record pointing contosostorage.com to contosostorage.blob.core.windows.net
- C
Create an alias record that references the storage account's static website endpoint
- D
Create an MX record to route all requests to your mail server
Show answer and explanation
Correct answer: C
Explanation
An alias record in Azure DNS allows you to reference an Azure resource directly, ensuring that if its underlying IP address changes, the DNS record will automatically be updated. This is the most efficient way to maintain up-to-date resolution for resources like Azure Storage.
- A. Incorrect.
While an A record could point to a current IP address, it would not automatically update if the IP changes.
- B. Incorrect.
A CNAME record can redirect traffic to the storage endpoint, but it may not dynamically handle IP changes related to Azure resources in all cases.
- C. Correct.
An alias record in Azure DNS can reference the static website endpoint and automatically update in case the IP address changes, ensuring seamless resolution.
- D. Incorrect.
An MX record is used for directing email traffic and is irrelevant to resolving a static website endpoint.