How to add SSL certificate on running your application using Route 53.

Fenil Vaghasiya
3 min readOct 19, 2022

--

In this blog, I have explained how generate SSL certificate and how add that certificate in your application.

There are many third party tools available in which to purchase free domain. I have purchased a domain from freenom. My domain name is harshilv.cf .

Figure: To see domain name

Now you have to host static websites via Amazon s3. In the image below I have paste the url of s3 where I host my website.

Figure: To see the static website

Now create a hosted zone. For that search Route 53 and on the left side click on the hosted zone. Enter your domain name and press the created hosted zone.

Figure: To create hosted zone

You can see there are two records created by default. Now copy all four name servers and paste that in freenom.

Figure: To see two NS and SOA record
Figure: To add NS in domain

Now create an SSL certificate. For that search Amazon certificate manager and click on request SSL. Choose to request a public certificate and press next. Enter your domain name and click on request. Now go inside the certificate and press create record in route 53 and create new CNAME record.

Figure: To see the certificate

Go check whether CNAME is there or not in the hosted zone.

Figure: To see the new CNAME record add

Now created cloudfront. For that select create distribution, in origin name select endpoint of s3, after that in viewer choose the redirect HTTP to HTTPS, in setting option add your domain in CNAME section and also add SSL certificate which you have created early.

Figure: To add endpoint of s3
Figure: To select redirect HTTP to HTTPS
Figure: To add CNAME and SSL certificate

Now paste endpoint of cloudfront in your browser.

Figure: To check cloudfront endpoint working or not

But still not access the domain name because of not adding cloudfront in the hosted zone.

Figure: To check domain working or not

So now create a new record and add the endpoint of cloudfront. For that click on new record and enable alias, choose cloudfront distribution and select endpoint of cloudfront.

Figure: To create new A record
Figure: To see all record in the hosted zone

Now hit your domain name see what happen !!

Figure: To check domain working or not

If you want to check it is correct or not then press Fn+12 and check server name.

Figure: To check the request

Happy Clouding !!!

--

--

Fenil Vaghasiya
Fenil Vaghasiya

Written by Fenil Vaghasiya

AWS Community Builder | 2x AWS Certified | 1x Azure Certified

No responses yet