I have a domain name hosted on bigrock.in pointed to an Amazon EC2 instance using Route 53. The four nameservers generated are placed in bigrock and it is working fine.
Now I have created a subdomain of the domain in bigrock and I want it to point to my application in another EC2 instance in another AWS account. Is this possible?
Yes. The AWS account that is currently controlling your domain name with Route 53 must be used, but it can be pointed to anything on the Internet.
Steps:
In the AWS account with the "other" EC2 instance, create an Elastic IP Address and assign it to the EC2 instance. This will ensure that its IP address does not change when the instance is stopped and started.
In your existing Route 53 configuration (in the original account), create a Record Set for the sub-domain (eg images.example.com) of type A and enter the Elastic IP Address as the value.
Once you have set the nameserver for your domain to point to Route53, you no longer need to control the subdomains from bigrock services. Just add them to your Route53 dashboard, and they'll be reflected live.
Related
I have created an EC2 instance that host a wordpress site.
Then I have created AMI image with it and created exact copy of the instance.
The instance that I have copied from is linked to a domain through Route 53.
A bizarre experience that I have right now is that (twice now), when I copy EC2 instances in a way described above, using HTTP to access either of the EC2 instances lead to re-routing to the domain that was routed by Route 53 for the first instance.
Shouldn't only the first instance be linked to the domain because that is how I have set the record in Route 53? Is it normal for duplicated EC2 instance to point to same domain when I copy it using AMI image? How do I make it so that the second copied instance does not get re-routed to the same domain as the first instance?
This really is unrelated to AWS, EC2, Route53, etc. You simply have the "Site Address" setting in your Wordpress configuration set as that specific domain name. Wordpress automatically redirects any incoming requests to the configured Site Address.
I have a root domain like example.com. It's now hosted on Amazon S3. For that I followed this tutorial:
http://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html
What would I have to do to have a subdomain like client.example.com to point to a EC2 instance?
client.example.com => ec2-XXX.us-west-2.compute.amazonaws.com
Is there like a tutorial out there explaining the steps?
Two simple steps:
You would just need to add a new 'A' record to assign the ec2 ip address to that subdomain in your amazon route 53 dns (or whatever dns provider you are using) - very simple to do. Step one will have requests for that sub-domain routed to the ec2 instance.
Step 2 is to tell the web server you are running, when it receives a requests for that sub-domaain, what website should it serve up to the user - you do this by 'binding' the name to the directory/location thast has the website on your ec2 instance.
You may also want to read over the following from AWS
http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-ec2-instance.html
It would also be better practice to assign your EC2 instance an Elastic IP address then forward requests to that IP.
We recommend that you also create an Elastic IP address and associate
it with your Amazon EC2 instance. An Elastic IP address ensures that
the IP address of your Amazon EC2 instance will never change.
I have a domain name registered with tmdhosting.com. And I have created a WordPress multisite setup on AWS using bitnami WordPress multisite stack.
Now I would like to point my domain name from my registrar to my AWS instance. Where they are asking me to provide them with a NS. I am new to AWS and I am not sure as to how to go about doing this.
Also did a little bit of research where it said that I will need a Route 53 (which is not free) I would want to know if there is another way to do this.
Can I use CloudFront to do this as with my previous provider had given me a cloudflare name server.
Please let me know the steps as to how to go about doing this.
To point a Domain Name to an EC2 instance, you can either use Route 53 or your own DNS service. In both cases:
Assign an Elastic IP address to your EC2 instance
In Route 53 or your own DNS service, define a domain/subdomain that points to this IP address
The above assumes that you wish to point to a single EC2 instance. If you have multiple instances with a Load Balancer in front, you will require a CNAME record pointing to the DNS name of the Load Balancer. (If using Route 53, using the "ALIAS" button to point to a Load Balancer.)
Route 53 is not free, but it is very cheap. If correctly configured to point to AWS resources, it can cost only 50c/month per hosted zone.
CloudFront is a content distribution network that caches web content. It will not assist you in assigning a Domain Name to an EC2 instance. (Custom domain names can be used with CloudFront, but that doesn't appear to be your particular question.)
I have the instance ec2-xx-xxx-xxx-xxx.ap-southeast-1.compute.amazonaws.com. It is running a bitnami lamp stack.
How do I create a subdomain for this like subDomain.ec2-xx-xxx-xxx-xxx.ap-southeast-1.compute.amazonaws.com?
Is it possible to do such this or should I purchase a domain first?
Thanks
You cannot manage AWS domains. You need to have your own domain first and use Route 53 or any other DNS provider to create an A record pointing to this specific EC2 instance.
Before creating the A record however you will need to provision an Elastic IP and assign it to your EC2. Please keep in mind that every account starts out with only 5 Elastic IPs and if you need more you will have to get in touch with Amazon for approval.
I'm using EC2 of Amazon to host a website built in JSP :
http://ec2-50-17-144-64.compute-1.amazonaws.com:8080/p2p
And I bought this domain:
www.p2pbrasil.com
How can I redirect www.p2pbrasil.com to my website in Amazon EC2 ?
When someone type www.p2pbrasil.com it redirects to http://ec2-50-17-144-64.compute-1.amazonaws.com:8080/p2p ?
You need to do two things
In the Amazon Web Service admin panel, create an elastic IP in the same region as your instance and associate that IP with your that instance (IPs cost nothing while they are associated with an instance, but do cost if not).
Add a A record to the DNS record of your domain mapping the domain to the elastic IP address assigned in (1). Your domain provide should either give you some way to set the A record (the IP address), or it will give you a way to edit the nameservers of your domain.
If they do not allow you to set the A record directly, find a DNS management service like ZoneEdit, register your domain as a zone there and ZoneEdit will give you the nameservers to enter in the admin panel of your domain provider. You can then add the A record for the domain in ZoneEdit.
I only mention ZoneEdit because the basic service is free, you could also use Amazon route 53 or a similar pay-for service, if you preferred.
Create an Elastic IP on the AWS Panel, then associate it to your instance.
Then use a DNS management service to add your domain and Ip address (Elastic IP), then on the domain provider panel add the DNS provided from the DNS management service.
I recommend EntryDNS which is actually free.
As you have your server on AWS best option is to use Route53 hosted zone.By doing this you can manage all your DNS entries using AWS. In future if you plan to use ELB's for your application, you can various traffic routing options using Route53.
Create Hosted Zone and get the name servers.
Replace current name servers with AWS nameservers from your Domain registrars DNS entries.
Create an A record in AWS hosted zone and give your servers IP (Elastic IP) as value.
For detailed instruction, you can follow this blog post. Mapping Domain Name to EC2 Server
Assuming this is a hobby website and your domain registrar isn't AWS.
If your registrar (for example godaddy.com) provides a DNS manager you simply need to add a CNAME record for www that points to the aws public DNS record for your instance. For example ec2-50-17-144-64.compute-1.amazonaws.com
This will make http://www.p2pbrasil.com display the same content as http://ec2-50-17-144-64.compute-1.amazonaws.com
Doing it this way you don't have to pay for an elastic IP, which is a dedicated resource. Your IP on your ec2 instance shouldn't change but could if you restart your instance.
Put the public IP from your EC2 instance as an A name to your root domain in Route 53 hosted zone.
This change might take some time.