DNS CNAME/A record not properly propagated

Hello team,
I’ve recently transferred a domain to Cloudflare and created a CNAME record pointing to the public FQDN of my EC2 instance.
Inside the instance I have a script that at each boot queries the metadata server, gets the public hostname and update via api the CNAME record.

Now, despite everything is working fine, when I try to resolve the CNAME record content, instead of getting the EC2 instance public hostname, I get the two IPs of Cloudflare.
I also tried with a A record to the public IP of the instance but it didn’t work either as I still get the same two IPs from Cloudflare.

Can anybody help me spotting what I am doing wrong?

Thanks,
Ivan

The following article explains why this happens:

If this is not what you want, you need to change your DNS records to DNS-only, though this disables all of Cloudflare’s features as well.

2 Likes

Got it, thanks Laudian for the super fast reply :slight_smile:

It was actually a matter of waiting as I started to see it propagated a few mins after I actually posted the question.

Cheers,
RJ

I’ve spoken too soon.
Actually having the CF proxy protection for A/CNAME records pointing toward public EC2 instances is not possible.
To be able to reach them I had to disable the proxy feature, then I started to properly resolve my CNAME and thus I reached the instance.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.