CDN endpoint - cannot set custom domain

60856927 66 Reputation points
2024-07-04T17:44:05.0033333+00:00

When I try to add custom domain to CDN endpoint, is says: "We couldn't find a DNS record for 'ogl.app' that points to 'oglapp.azureedge.net'. Before you can associate a domain with this CDN endpoint, you need to create a CNAME record with your DNS provider for 'ogl.app' that points to 'oglapp.azureedge.net'." But CNAME set properly. https://toolbox.googleapps.com/apps/dig/#CNAME/ What is wrong?

Azure Content Delivery Network
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 46,956 Reputation points Microsoft Employee
    2024-07-05T15:29:47.85+00:00

    @60856927 ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    • Can you confirm if the CDN SKU is Microsoft? Or is it Azure CDN Standard from Edgio/ Azure CDN Premium from Edgio?
    • Can you confirm if the CDN's endpoint is actually "oglapp.azureedge.net" and not something else?
    • Can you share a screenshot of the error message please?

    Cheers,

    Kapil


1 additional answer

Sort by: Most helpful
  1. Ganeshkumar R 665 Reputation points
    2024-07-04T18:06:53.9633333+00:00

    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

    1. 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.
      
      
    2. 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.
    3. 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.
    4. 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.
    5. 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.
    6. 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.
    7. 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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.