Configuring Cloudflare DNS to work with AWS S3 static website hosting

Hi,
i have the following problem.
My domain is managed by, let’s say, the A company.
My email is managed in the B company’s server: email are working well.
My website is published in a AWS S3 bucket as a static website: if I use the URL that AWS have given to me, it works.

My DNS configuration on Cloudflare is:

  • No A record is present;
  • 2x CNAME records for root and www;
  • MX and TXT records presents for email;

Email works fine;
Direct URL from Static S3 Website URL works;
Website’s CNAMEs does not works.

Any ideas?

I believe, even without CF, a CNAME to s3 requires the hostname to exactly match the bucket name. So if you want static.example.com the bucket name also has to be static.example.com. Is your configuration different?

Hi Judge.
thx for the reply.

It’s correct.
I have created the bucket with the exact name of the domain, as you have explained.

Any ideas?

Assuming your CNAME is correct it would appear as if Cloudflare simply cant connect to the server.

That could be either a firewall or an SSL issue. Have you made sure Cloudflare is not blocked? What is your SSL mode? Do you have a certificate on your server?

Can you post the CNAME you were given?

The resource that Cloudflare cannot reach are on Amazon AWS.
I’ve configured a static website on S3.
It’s not a permission issue, I can reach the URL that AWS has created for the static website.
In Cloudflare I’ve configured only a CNAME.
No A record on my Cloudflare DNS configuration

You could still have Cloudflare blocked.

I didnt ask about A records.

What is the CNAME in question?

2 CNAME configured for the static website: the root and the www

You said that already and the question was what is the CNAME.

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