Map Domains or Sub Domains to CDN :: ACM SSL :: AWS

Neerajpaliwal
3 min readNov 25, 2022

On this task, our main motive is to reduce the server management process of Nginx reverse proxy or SSL management for multiple domain points to a single server for the same backend. It will help us to reduce downtime for multiple domains at the same time point to any network. The monitoring part will be easy after using this process. Let’s start.

Point your CDN to your Website URL.

In my case, I host one static App on S3 Bucket and host a website using the S3 Endpoint URL.

Let’s Start with CDN first.

Create distribution

Choose your Origin

Create Alternate CNAME records for your multiple domain.

Now Request for ACM certificate.

Once you request for Certificate Make Sure you create a Route 53 hosted Zone for Main Domain or point that nameserver to your Domain Provider for DNS Verification.

Point Domain Nameserver to your Domain Provider. You can follow below link for that.

https://jryancanty.medium.com/domain-by-godaddy-dns-by-route53-fc7acf2f5580

Once Your Domain Are Ready Go to ACM and Request for Certificate.

After Request Your certificate is in pending state.

Now go for Create Records in Route 53 Using dialog box mention on image.

Once Mention CNAME Record is updated to Respective domain status change to Issued.

Now,

For Sub Domain you have to MAP CNAME record to domain provides which are provided by ACM.

For Example, you have to copy the CNAME record and Value from Image and MAP on your domain provider account. Like.

Once You Issued The Certificate Your CDN shows multiple domains with a single Certificate. Now create A record for the Main domain to Point to CDN as an alias.

Do this Process for All MAIN Domain.

Now For Sub Domain, you have to create CNAME Record on the domain provider side. For E.g

Now you can verify your CDN delivery using the domain you mapped.

https://example1.com/index1.html

https://example2.com/index1.html

https://sub.example1.com/index1.html

https://sub.example2.com/index1.html

Conclusion:

You can map subdomains using Route 53 As well. But In case the Main domain is pointed to another website we use CNAME records to Point subdomain as well.

Note:

You cannot Point A record to CDN link from another domain provide so you have to go with Route 53. Else use Subdomain concepts.

Thanks,

Neeraj Paliwal

--

--