Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

how to created new subdomain in ec2 actually i want to host my multiple projects on this so can you tell the exact way how to create subdomain. i searched a lot but no success. and my domain is: as follows

thanx in advance...

share|improve this question

2 Answers 2

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.
share|improve this answer
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 '11 at 10:58

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, "" 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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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