Amazon Route53: Using Subdomain when main domain hosted elswhere

294 0

In this article , I will show you to create a subdomain in Amazon Route53 in case your domain is hosted outside of amazon aws.
Lety me say, that if your domain is already in AWS there is no pain. You will just need to go to Route53 hosted zone then , Select your main domain in the list, then click on Create Record Set. Select Yes and type the alias name.i.e I am creating login.mymaindomain.com I will type login in the box as shown

Then you can Enter an Ip address or select an existing resource if already have one in AWS. and you are set

Now the main issue most people faces is when you have purchase your domain from name.com and your website is hosted in BlueHost, How would you manage this. Sometime it look obvious but it is never obvious until you hit the “unhitable”.

In this particular case, the suggested procedure is as follow:
1. Create a new hosted zone for your subdomain by clicking on “Create Hosted Zone” and entering the following information:Login.myMaindomain.com if login is the alias as previously described.

Comment: This section can be anything even blank
Type: Public Hosted Zone, by default

  • Click “Create”
  • Select again your hosted zone, and click the record set with type “NS”. NS stands for NameServer
  • Copy the nameservers in the “value” box on the right. Usually 4 of them. They looks like **

ns-900.awsdns-48.net
ns-1284.awsdns-32.org
ns-1891.awsdns-44.co.uk
ns-260.awsdns-32.com

  1. Return to your original hosted zone. Here Name.com in my example. Select your domain and manage DNS Record (typically bluehost). This is the hosted zone or zone editor for your main domain
  2. Click “Create Record Set” and enter the following:
    Name: Login.myMaindomain.com
    Type: NS – Name Server
    Value: Paste in those nameservers you copied, then click create. You have to repeat this for each or the record you copied from Amazon **
  3. Return to the hosted zone for your subdomain and click “Create Record Set” (from Amazon route 53)
  4. Here you will tell Route 53 to redirect your subdomain to anything you want. You can use an “A” record with a blank “Name” field and enter in an IP address. You can click “Yes” next to an alias and then click in the “Alias Target” box to select which AWS service to resolve to. Do not forget to click “Create” when done.

Tips:: Important
This step may not work depending on the setting you have done for your main domain. If this is the case, the easier way if to reset your nameserver in Name.com to the default one ..meaning your nameserver are resolving to ns1.bluehost.com and ns2.xx
Then repeat the step nas describe. For you main domain just use a A record to point to the host (exple: blueHost) .You are set to go

The tips is added because some readers contacted me on how to solve their routing issue with bluehost(hosting wordpress website) with domain purchased in name.com .This step solve their problem.

If you like the post please leave a comment. If you don’t like it, Leave again a comment so that i can make the next post better.

Related Post