How do I connect my Namecheap domain to my EC2 Instance

1

I have created the hosted zones in Route 53. I have taken the Nameservers and put those into my Namecheap domain through custom dns. Its been around 4 days. Nothing has worked. Please help, I am pretty new to this.

Mk_T
asked a month ago204 views
2 Answers
1

First, I assume you already got the name servers in route53. https://www.namecheap.com/support/knowledgebase/article.aspx/10371/2208/how-do-i-link-my-domain-to-amazon-web-services/

Next is to decide how to associate the ec2 instance with the domain. There are 2 options:

  1. Either you can associate an elastic IP (https://repost.aws/knowledge-center/intro-elastic-ip-addresses), though this means your instance will be on public subnet, which is not super secure
  2. Front a private EC2 with an application load balancer (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html)

Assuming you did above, you should check security groups if the ec2 instance, and making sure you created route 53 records to ec2 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-ec2-instance.html ) or alb (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-elb-load-balancer.html)

Hope it helps

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago
0

First, you will need to point nameservers in your AWS account and create a hosted zone for your Namecheap domain. Once you’ve finished, follow these steps:

  1. Sign in to your Namecheap account.

  2. Find Domain List from the left sidebar and click on the Manage button next to your domain name:

  3. Select the Custom DNS option from the drop-down for Nameservers and enter your 4 Custom nameservers (from your AWS account) into the fields given. Once entered, make sure you click on the green checkmark to save the changes:

NOTE: You should enter each server on its own line. If you run out of lines, click Add Nameserver at the bottom of the list.

Allow 24-48 hours for DNS propagation to take effect.

Then go to Route 53 Hosted Zone:

Create A Records

  • Go to your Route 53 service, click on Hosted Zones
  • Select the domain name
  • Select Simple routing under Routing policy
  • Enter a value in TTL or leave as 300ms. TTL is explained below
  • Click Create record button
  • In the next screen, leave the record name blank. Slect A, in the record type and enter the IP address of your instance in the value field. This send the root domain name to the instance specified

Create other A Records

  • Click Create record button again
  • Enter the app name in the Record name field, select A record type and enter the first IP address of the instance
  • Under TTL (Time to Live), select or enter any value of your choice.
  • Select Simple routing under Routing policy
  • Click Save records
answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions