- 最新
- 投票最多
- 评论最多
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:
- 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
- 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
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:
-
Sign in to your Namecheap account.
-
Find Domain List from the left sidebar and click on the Manage button next to your domain name:
-
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
相关内容
- AWS 官方已更新 1 年前
- AWS 官方已更新 7 个月前
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前