If you have already created a hosted zone then it's very easy to register a sub-domain in Route 53. If not, please go through my post about What is Route 53 and how to create Hosted Zone in AWS.
Continuing further -
- Login to your AWS account and go to Route 53 service
- Choose Hosted zones option from the left navigation menu
- Click on the button Create hosted zone
- Enter the fully qualified sub-domain name.
Here is the trick, append the word before your main domain to create a sub-domain. For Example, if your domain name is test-domain.com then your sub-domain would be <subdomain-name>.test-domain.com - You can add a description in the description box. This is an optional field.
- Choose the zone type either hosted zone you creating is accessible publically or privately.
- You can add some tags and the last click on Create hosted zone button.
Once hosted zone is created, you will see two records created by default. One with type SOA and another one NS.
Name Server (also known as NS) is important. It holds few values for route traffic. These values must be added to the Internet domain registrar means from where you have purchased your domain i.e. GoDaddy, BogRock, Cloudflare, etc.
Now create a record with type A. Record Type A is responsible for routing traffic to an IPv4 address and some AWS resources. Enter your <subdomain-name> (without dot(.)) in the record name field and enter the public IP address of your application in the value section. Keep other options default.
At the last - Create an NS record in the main domain-hosted zone (for example test-domain.com) similar to the above one. Put NS value as the value of sub-domain NS and save.
If all goes well, then your hosted zone is created and now domain redirection to your application should start working.
If you would like to contribute, you can write an article and mail your article to droidamar007@gmail.com. You can see your article appearing on the main page and helping others.
Comments
Post a Comment
You are responsible person and please write responsibly