简体   繁体   English

AWS route53 和 dns 设置

[英]AWS route53 and dns setup

I registered domain with AWS and set Hosted Zone.我在 AWS 上注册了域并设置了托管区域。 inside the hostedzone i have NS with 4 records and SOA as a record type I added A record type and point it to EC2 public IP.在 hostedzone 内,我有 NS 和 4 条记录,SOA 作为记录类型我添加了 A 记录类型并将其指向 EC2 public IP。

in browser i can not get response when type domain name.i got "This site can't be reached"在浏览器中输入域名时我无法得到响应。我收到“无法访问此站点”

search here and some people advice to check NS with dig command.在这里搜索,有些人建议使用 dig 命令检查 NS。 dig command answered when i run in on Ec2 Ubuntu command but didn't get response when run it on my laptop. dig 命令在我运行 Ec2 Ubuntu 命令时得到响应,但在我的笔记本电脑上运行时没有得到响应。 I have other sites on roure53 but new one doesn't work.我在 roure53 上有其他网站,但新网站不起作用。 any thought?任何想法?

How did you registered the domain?你是如何registered域名的? Did you purchase it from a website and paid for it?您是从网站上购买并付款的吗?

From what you said, it seems the FIRST thing you did was creating a Hosted Zone in Route53.从您所说的来看,您做的第一件事似乎是在 Route53 中创建托管区域。 Let me explain.让我解释。

Usually when we purchase a domain from another website, after paying for it and everything we will need to tell the Domain Registrar to use the Name Servers and input a value like ns1.abcdomain.com and ns2.abcdomain.com .通常,当我们从另一个网站购买域名时,在支付完所有费用后,我们需要告诉域名注册商使用Name Servers并输入类似ns1.abcdomain.comns2.abcdomain.com的值。 The purchase of a domain name usually comes with a free DNS service, so it will already have a valid name servers defined.购买域名通常附带免费的 DNS 服务,因此它已经定义了有效的名称服务器。

If my guess is correct, you created a hosted zone in AWS Route 53 without actually paying and registering a domain with a registrar (AWS is also a registrar).如果我的猜测是正确的,那么您在 AWS Route 53 中创建了一个托管区域,而没有实际支付费用并向注册商注册域(AWS 也是注册商)。 Therefore the domain only exist in AWS world because you created a Hosted Zone.因此,该域仅存在于 AWS 世界中,因为您创建了一个托管区域。

This explains why running dig on your EC2 provided the expected IP, because somewhere along the line the EC2 reaches AWS internal Route53 DNS service before reaching the public inte.net for DNS result.这解释了为什么在您的 EC2 上运行dig提供预期的 IP,因为 EC2 在到达公共 inte.net 之前到达 AWS 内部 Route53 DNS 服务以获取 DNS 结果。

If you indeed paid AWS something like $12 to purchase a domain, you might have misunderstood their interface (which can be confusing sometimes) and missed appointing Route 53 to be the domain's Name Servers.如果您确实向 AWS 支付了大约 12 美元来购买域,您可能误解了他们的界面(有时可能会造成混淆)并且错过了将 Route 53 指定为该域的名称服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM