When setting up a custom domain for your Azure Content Delivery Network (CDN) endpoint and encountering issues with DNS validation, there are several potential factors to consider. Here's a step-by-step guide to troubleshoot and resolve the issue:
Step-by-Step Troubleshooting
- Verify CNAME Record
- Use DNS lookup tools to verify that the CNAME record is correctly set up.
- For example, using the Google Dig tool: Google Dig Tool
- Ensure that the CNAME record for
ogl.app
points to oglapp.azureedge.net
.
CNAME record for ogl.app:
ogl.app. IN CNAME oglapp.azureedge.net.
- DNS Propagation
- DNS changes can take some time to propagate. It might take up to 48 hours for DNS records to fully propagate across all DNS servers.
- Use multiple DNS lookup tools to confirm the CNAME record:
- Check DNS propagation globally to ensure the CNAME record is available worldwide.
- Cache and TTL (Time-To-Live)
- Clear your DNS cache to ensure you're not seeing outdated DNS information.
- You can clear the DNS cache on your local machine with the following commands:
- Windows:
ipconfig /flushdns
- macOS:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- Linux:
sudo systemd-resolve --flush-caches
- Check the TTL value of your DNS record. If the TTL is high, it might take longer for changes to be recognized.
- Correct DNS Configuration
- Ensure that the CNAME record is correctly configured in your DNS provider's control panel.
- Double-check for typos or incorrect values.
- Custom Domain Validation in Azure
- Navigate to the Azure portal: Azure Portal.
- Go to your CDN profile and select the CDN endpoint.
- Under the Custom domains section, try adding the custom domain again.
- Azure will perform a DNS check to verify the CNAME record.
- Check for DNSSEC
- If your domain is using DNSSEC (DNS Security Extensions), ensure that it is configured correctly. DNSSEC misconfigurations can sometimes cause issues with DNS resolution.
- Using Azure CLI for Validation
- You can use Azure CLI to check the custom domain validation status. Run the following command:
az cdn custom-domain validate --profile-name <CDN_Profile_Name> --endpoint-name <CDN_Endpoint_Name> --hostname ogl.app --resource-group <Resource_Group_Name>
Replace <CDN_Profile_Name>
, <CDN_Endpoint_Name>
, and <Resource_Group_Name>
with your actual resource names.
Example DNS Lookup Check
Using the Google Dig tool, you should see an output similar to this if the CNAME is correctly set:
; <<>> DiG 9.10.6 <<>> CNAME ogl.app
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12345
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1
;; QUESTION SECTION:
;ogl.app. IN CNAME
;; ANSWER SECTION:
ogl.app. 3600 IN CNAME oglapp.azureedge.net.
;; AUTHORITY SECTION:
azureedge.net. 3600 IN NS ns1-azureedge.net.
azureedge.net. 3600 IN NS ns2-azureedge.net.
;; ADDITIONAL SECTION:
ns1-azureedge.net. 3600 IN A 104.40.175.65
;; Query time: 100 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu Oct 14 12:34:56 UTC 2023
;; MSG SIZE rcvd: 123
If you have followed all these steps and are still encountering issues, contacting Azure support for further assistance would be a prudent next step.