Dandan
Dandan

Reputation: 680

Can amazon cloudfront be setup to have multiple domains on cloudfront.net

I'm wanting to setup amazon cloudfront, however the assets need to be available on both http & https.

I also want to use multiple cnames. e.g. xyz0.cloudfront.net xyz1.cloudfront.net xyz2.cloudfront.net xyz3.cloudfront.net

Is this possible at all?

From what I've read the only way this can be done is by using a custom cname (xyz0.example.com) but the problem with this is that it forces me to upload our SSL certificate to Amazon in order to work with https and it costs $600 per month!

Thanks for any help.

Upvotes: 7

Views: 14476

Answers (2)

captainblack
captainblack

Reputation: 4425

You can not only serve different sub-domains, but also serve different root domains from a single CloudFront distribution. The two requirements for that would be:

  • An ACM Certificate that has all the domains you need CF to serve
  • Add those domains in Alternate Domain Names (CNAMES) section
  • Pass the host (Origin) header by whitelisting it in the cache behaviors

For detailed info, have a look at this video from AWS Premium Support.

Upvotes: 12

Khoa Nguyen
Khoa Nguyen

Reputation: 1600

You can have multiple CNAME (a.bam.com, b.bam.com, c.bam.com) for one Cloudfront distribution.

Though you need to upload a wildcard SSL cert (*.bam.com) to support all those CNAMEs.

You can setup SNI Custom SSL ($0 per month) instead of Dedicated IP Custom SSL ($600 per month). More info visit: http://aws.amazon.com/cloudfront/custom-ssl-domains/

Upvotes: 4

Related Questions