How to setup AWS S3 bucket to be accessed through subdomains with Cloudflare DNS.

Category : Amazon AWS

The client wanted to create a file server for training documents including MP4, PDF, PPT, WMV, etc. that was accessible through different subdomains. DNS managed through Cloudflare.

In Amazon’s S3 dashboard, create a bucket that matches the subdomain you want to use.


For example, subdomain would need a matching bucket, Make sure the created bucket is set to PUBLIC.


Left click on the bucket to open it. Go to Permissions and CORS configuration.


Inside CORS configuration, you will need to add this information configured for your subdomain:

<?xml version=”1.0″ encoding=”UTF-8″?>

<CORSConfiguration xmlns=””>













Cloudflare Configuration

You will need to create a CNAME record. Set the name as the subdomain, in our example, this is video.

The Value would be:


Leave a Reply