Is it possible to redirect a domain to Amazon EC2

0 votes

I wish to use EC2 to host a website built in JSP. I have a domain say XYZ.com how can I re direct this domain name to my website on EC2?

Apr 13, 2018 in Cloud Computing by hemant
• 5,790 points
2,592 views

3 answers to this question.

0 votes

Your EC2 instance has an IP address as well as a DNS name. However, the default IP address is assigned dynamically and might change. You will keep the IP address as long as the instance is running and across reboots, but if you are forced to stop/start or anything like that you will lose it. If you have a domain name pointing to your instance, that is a bad thing. To solve this issue, you will want to obtain an Elastic IP and assign it to your instance. The Elastic IP address is static and belongs to your account. It can be used with any instance. Note that it will replace your current IP address and DNS name.

Route 53 is an authoritative DNS service, meaning it responds to queries for your domain. Let's say you have a website at www.XYZ.com. When you go to that address, a query goes out to one of the DNS servers associated with example.com. The DNS server knows that www is pointing to IP address 1.2.3.4 and returns that response. In this case, that would be an A record. There might be other records as well, such as MX records pointing to the mail servers for your domain. You might use an EC2 instance as your web server, Google Apps for your e-mail and so on. The DNS server knows all these things and can point the client in the right direction, whether it is a web browser or a mail server wishing to deliver a message to you.

answered Apr 13, 2018 by brat_1
• 7,200 points
0 votes

You can do two things basically to redirect a domain in EC2

  1. 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).
  2. 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.
This way you can redirect a domain.
answered Nov 30, 2018 by Aniket
0 votes
Create an Elastic IP on the AWS Marketplace, 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.
answered Nov 30, 2018 by Abhinav

Related Questions In Cloud Computing

+1 vote
1 answer

Is it possible to get an ec2 pricing programmatically?

Yes absolutely. You may get AWS pricing programmatically ...READ MORE

answered Apr 10, 2018 in Cloud Computing by code_ninja
• 6,300 points
2,007 views
+1 vote
3 answers

AWS EC2: Is it possible to edit httpd.conf file in

It would be prompting you a alert, ...READ MORE

answered Aug 17, 2018 in Cloud Computing by Priyaj
• 58,020 points
2,900 views
0 votes
1 answer

Is it possible to use VPC to have access between two AWS Regions

Good question this. Currently this feature is ...READ MORE

answered Apr 18, 2018 in Cloud Computing by code_ninja
• 6,300 points
849 views
0 votes
1 answer

Is there a way to use amazon ECR image from one account in the code build of another account?

These forums might just help with AWS ...READ MORE

answered May 7, 2018 in Cloud Computing by brat_1
• 7,200 points
1,669 views
0 votes
1 answer

Is there a way to simulate perimeter security using Amazon Web Services Model?

As we all know traditional perimeter security ...READ MORE

answered Jul 9, 2018 in Cloud Computing by DragonLord999
• 8,450 points
748 views
0 votes
1 answer

AWS: Is there a way to simulate perimeter security using Amazon Web Services Model?

As we all know traditional perimeter security ...READ MORE

answered Jul 11, 2018 in Cloud Computing by DragonLord999
• 8,450 points
1,297 views
0 votes
1 answer

Does it make sense to have an Amazon Elastic Load Balancer with just one EC2 instance?

ELB automatically distributes incoming application traffic across ...READ MORE

answered Jul 12, 2018 in Cloud Computing by ArchanaNagur
• 2,360 points
1,125 views
0 votes
1 answer

Is there a way to simulate perimeter security using Amazon Web Services Model?

To start with,perimeter security is the using ...READ MORE

answered Jul 17, 2018 in Cloud Computing by code_ninja
• 6,300 points
708 views
+3 votes
3 answers

Is it possible to delete a API in AWS API Gateway?

Yes, it is possible to delete an ...READ MORE

answered Mar 27, 2018 in Cloud Computing by brat_1
• 7,200 points
4,817 views
0 votes
1 answer

Is there a way to transfer files between AWS s3 and ec2

The answer is a definite yes yes. ...READ MORE

answered Apr 17, 2018 in Cloud Computing by brat_1
• 7,200 points
916 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP