CNAME to Cloudfront not working

What is the name of the domain?

What is the error message?

NXDOMAIN

What is the isssue you’re encountering

CNAME record flattens to A records but when accessing website it doesn’t redirect to the IPs in Cloudfront

What steps have you taken to resolve the issue?

I’ve just migrated my domain to Cloudflare and set up my site in it, but it simply won’t redirect traffic to Cloudflare.

I’m using AWS ACM to manage the certificates and I have enabled Full (strict) SSL/TLS encryption (full does not work also).

I’ve tried setting up certificates by importing Cloudflare ones in AWS ACM, it also didn’t work. I’ve also tried pointing the CNAME to another working URL (AWS API gateway execute endpoint and others), which didn’t work as well.

I’m inforcing rewriting HTTP to HTTPS. I have no idea what to do anymore. Did anyone go through this an knows how to solve it?

What feature, service or problem is this related to?

DNS records

Hi @tonellicontato,

Have you enabled Proxy-mode for the DNS records pointing to Cloudfront? Please keep in mind that when Proxy mode is on your real IP addresses for Cloudfront will be hidden and Cloudflare IPs will be presented.

1 Like

I’ve just found the issue. I haven’t restarted my modem or lost internet connection for a long time and after restarting, my site started acessing normally again. Even after flushing DNS, cache, clearing navigation data etc, NS records in dig were pointing incorrectly to AWS servers.

It seem my modem was caching it somehow. Thanks!

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