There is a website which is distributed via Azure CDN. The CDN endpoint was used as a destination of CNAME entry for www.< EXAMPLE >.com with usage of Google DNS. The www address to the website works fine with one exception, twitter cannot resolve the address https://www.<EXAMPLE>.io, thereby it cannot read meta tags to generate so called twitter card. On the twitter validator page when you try validate above address it will return following message:

ERROR: Fetching the page failed because the fetcher cannot resolve the address.

However, when you enter CDN endpoint address (https://EXAMPLE.azureedge.net) in the same validator then everything is fine and Twitter is able to read the website content. Also facebook sharing debugger doesn't complain.

Below you can see obscure dig output for www.EXAMPLE.io domain.

www.EXAMPLE.io.     60                      IN CNAME    EXAMPLE.azureedge.net.
EXAMPLE.azureedge.net. 1799                 IN CNAME    EXAMPLE.afd.azureedge.net.
EXAMPLE.afd.azureedge.net. 299              IN CNAME    afd.t-XXXX.t-msedge.net.
afd.t-XXXX.t-msedge.net. 200                IN CNAME    t-XXXX.t-msedge.net.
t-XXXX.t-msedge.net.    43                  IN CNAME    XXXXXXXXXXXXX.ctrl.t-XXXX.t-msedge.net.
XXXXXXXXXXXXX.ctrl.t-XXXX.t-msedge.net. 223 IN CNAME    standard.t-XXXX.t-msedge.net.
standard.t-XXXX.t-msedge.net. 236           IN A

What can cause the problem and how can I fix it?

  • Seven DNS lookups until you get to an IP address? That seems excessive to me. I don't know if there is a limit, but it would seem prudent to avoid that many CNAMEs to me. – Stephen Ostermiller Feb 17 at 22:38
  • Hi @StephenOstermiller. Exactly, that was the first thing I thought but I don't have that possibility in Azure CDN. Those entries are done by Azure itself, it's a part of the service. – sobi3ch Feb 18 at 8:23
  • Maybe you could try switching to an ALIAS record set: docs.microsoft.com/en-us/azure/dns/dns-alias – Stephen Ostermiller Feb 18 at 10:50
  • @StephenOstermiller in upcoming days we will try to do it using Azure DNS and ALIAS entry. I'll report back here how it went. – sobi3ch Feb 20 at 11:49

So it turns out that Azure has 3 different types of CDNs. Microsoft, Verizon and Akamai, and only Verizon and Akamai work with twitter resolver.

You need to switch Microsoft Azure CDN to Verizon or Akamai to solve this issue.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.