Rupesh Deshmukh
Jul 2 · 5 min read

Create a Hosted Zone for our domain:-

  1. Open the Amazon Route 53 console at https://console.aws.amazon.com/route53/.
  2. Click Hosted Zones in the navigation pane.
  3. Click Create Hosted Zone.
  4. In Domain Name, enter a domain name.

Click Create.

Now, we can see new NS records from aws, and we want to copy it over to our current DNS provider’s records.

Set up a DNS provider — ns switch:-

If we registered a new domain name, we’re ready to set up Amazon Route 53 as our DNS provider.

However, in our case, we need to transfer existing DNS records from our current DNS provider to Amazon Route 53 in order to ensure the continued availability of the services hosted under the domain name.

To determine which DNS records we must replicate in Amazon Route 53, check the DNS record settings configured for the domain in our current DNS provider. Two records that we should not transfer to Amazon Route 53 are the Start of Authority (SOA) and Name Server (NS) records. These records were set by Amazon Route 53 when the name servers were allocated, and they should not be changed.

First, log into the domain name registrar that we used to register our domain name. Use the web interface provided by the registrar to set the name servers for our domain to the name server values displayed under Name Servers in the details for the hosted zone.

Wait between two to 48 hours for the Internet DNS resolver network to propagate name server changes. To see if the name server change has gone through, use a command-line utility such as dig or nslookup.

Set up a web server

We set up Apache webserver on our ec2 instance:

$ sudo apt-get update
$ sudo apt-get install apache2

Now we want to set up a record inside of our Route53 to point our server. We’re going to create a new recordset.

Create Record Sets

Let’s configure the alias resource record set for our www subdomain.

  1. On the Hosted Zones page, select the hosted zone that we created for our domain.
  2. Click Go to Record Sets.
  3. Click Create Record Set.
  4. Under Create Record Set, do the following:
  5. In Name, type www. The root domain is already specified for us, and the connecting period (.) appears when we start typing.
  6. From Type, select A — IPv4 address.
  7. In Alias, select No.
  8. Put ip address as a value.
  9. From Routing Policy, select Simple.
  10. Leave Evaluate Target Health set to No.
  1. Click Create.

Alias setting

Now we want to set an alias (epicmath.com) for www.epicmath.com:

Check propagation

To see if the name server change has gone through, we use a command-line utility such as dig or nslookup:

$ dig epicmath.com
...
;; ANSWER SECTION:
epicmath.com. 300 IN A 52.8.47.59
$ nslookup www.epicmath.com
...
Non-authoritative answer:
Name: www.epicmath.com
Address: 52.8.47.59

HOW TO ADD SSL CERTIFICATE:-

Using 2 methods

  1. Static page on Elastic Beanstalk
  2. Static page on Amazon S3

1. Elastic Beanstalk

a) Get SSL certificate

To get your SSL certificate, simply go to the AWS Certificate Manager (ACM), which issues them for free.

Register SSL certificate through ACM

On the first step, you enter the domain name(s) you want to register. Subsequently, on the second step, it will ask you to validate that you are actually the owner of the domain. The 2 options are (1) DNS and (2) Email, just follow the instructions, and soon you’ll have your certificate (it may take up to 60 minutes). If your domain is already on an AWS Hosted Zone, I recommend the DNS route.

2. Amazon S3

a) Get SSL Certificate

Again, it’s best to use the free SSL certificates issued by AWS Certificate Manager. See section 1 for instructions.

b) Link to your S3 page

To use your SSL certificate can get your S3 page onto HTTPS, we have to use a service called CloudFront. You can find your AWS console. Click ‘Create Distribution’, and go through the fields — you can leave most of them as they are.

The important fields are Origin Settings, through which you link to your already existent S3 page. Additionally, lower down, you can select the respective SSL Certificate.

Once the distribution is created, you’ve basically got an outer layer wrapped around your page that can handle HTTPS.

How do you make your URL address actually point there? Go to the Route 53manager in your AWS console. Now click ‘Hosted Zones’, select your domain, and ‘Create Record Set’. The goal here is to create an alias that links your domain to the CloudFront distribution you just made.

Choose your CloudFront distribution from the dropdown for ‘Alias Target’, and create. The changes may take a bit to propagate, but you’re done!

Petabytz

Petabytz Technologies Inc. is a leading IT consulting,Data Science and Engineering, business solution and systems integration firm with a unique blend of services.

Rupesh Deshmukh

Written by

Petabytz

Petabytz

Petabytz Technologies Inc. is a leading IT consulting,Data Science and Engineering, business solution and systems integration firm with a unique blend of services.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade