how to created new subdomain in ec2 amazon.com actually i want to host my multiple projects on this amazon.com so can you tell the exact way how to create subdomain. i searched a lot but no success. and my domain is: as follows http://ec2-122-248-220-105.ap-southeast-1.compute.amazonaws.com

thanx in advance...

2 Answers 2


You have to have your own domain name to create sub-domain on it. You cannot create sub-domain on Amazon's public DNS name.

You can register for a new domain using Amazon's Route 53 service. That is the most easiest way to setup your domain name for EC2 instance as the general DNS setting is done automatically. But it is also possible to use your existing domain name register with some other domain-hosting services.

After your domain is setup with Amaonz Route 53, you can create a sub-domain from the Route 53 dashboard by adding an A record. So you will just create an A record entry where the name of the entry will be your sub-domain name, eg, "subdomain.example.com" and the value will be the public IP for your EC2 instance. Do not use the Public DNS name of your EC2 instance, because this name can be changed. It may take couple of minutes to your changes take effect.

Then you have to create name based virtual host on your EC2 instance. It may vary depending on your EC2's operating system. There are already some good tutorial out there to create name based host on different OS.

  • 1
    You cannot create sub-domain on Amazon's public DNS name. Why? How do you know that? Could you provide a link for AWS official docs?
    – Green
    Oct 11, 2016 at 20:19

What you need to do :-

  • Assign an elastic IP to your instance.
  • Obtain a domain name that you like.
  • Use the Domain Name System tools provided by the registrar for your domain name to point a DNS A record at your elastic IP.
  • Use the same tools to point a CNAME subdomain at the A record.
  • On your EC2 instance you will need to setup and configure Namebased Virtualhosts.
  • but how can i create the subdomain im not getting??? can you send me the link so that i can create subdomian
    – gur
    Aug 11, 2011 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.