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
질문됨 2달 전288회 조회
2개 답변
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
전문가
답변함 2달 전
profile picture
전문가
검토됨 2달 전
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
답변함 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠