DNS 更改是否可以顺利进行,或者是否有一段时间网站不可用?

发布于 2024-09-16 15:07:57 字数 194 浏览 2 评论 0原文

两小时前,我更改了我的一个域的名称服务器。 我一直在浏览器中检查,但现在它不再带我到我的旧网站。但是,它只是显示“无法连接”错误。

我不知道转换是否已发生并且新服务器存在问题,或者只是尚未发生。

我知道 DNS 更改会在 24 小时后生效。

所以我的问题是 - 是否有一段时期旧地点和新地点都不起作用?或者说过渡是无缝完成的?

I changed the name servers for one of my domains two hours ago.
I kept checking in a browser and just now it stopped taking me to my old site. However, it just displays a "could not connect" error.

I don't know if the transition took place and there's a problem with the new server or it just didn't happen yet.

I know a DNS change takes effect after 24 hours.

So my question is - is there a period where neither the old location nor the new one are working? Or is the transition done seamlessly?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

迷爱 2024-09-23 15:07:57

DNS 查找在多个级别上进行缓存 - 通过名称服务器、备份名称服务器、提供商的名称服务器......这意味着世界上的每台计算机可能需要长达 24 小时才能将您的主机名解析为正确的 IP。

在此期间,一些请求将在服务器 A 上结束,一些请求将在服务器 B 上结束。

如果两台服务器都设置为处理您的主机名,则可以实现无缝转换。然而,有些电子邮件可能最终会出现在旧邮箱中;另外,如果您有一个包含大量用户交互的动态网站,那么您会遇到一团糟,因为有些交互发生在旧服务器上,有些交互发生在新服务器上。在这种情况下,确实最好彻底清除,更改 DNS 条目并关闭旧服务器。

DNS lookups are cached on multiple levels - by nameservers, backup nameservers, providers' nameservers.... That means that it can take up to 24 hours until every computer in the world resolves your host name to the correct IP.

During that period, some requests will end up on server A, some on server B.

If both servers are set up to deal with your host name, a seamless transition is possible. However, some E-Mails may end up in the old mail box; also, if you have a dynamic web site with lots of user interaction, you'll have an awful mess because some interaction has taken place on the old, and some on the new server. In that case, it is indeed better to make a clean cut, change DNS entries and switch off the old server.

妄断弥空 2024-09-23 15:07:57

网络不是我的专业领域,因此可能有些不正确,但我相信它至少在某种程度上是准确的。

大多数域名服务器对互联网的一小部分(如单个域)拥有权限。对于他们不是权威的领域,他们会询问其他名称服务器,直到获得权威答复。
一些域名服务器还缓存非权威响应,因此它们不会不断地向其他域名服务器请求相同的信息。

当缓存的响应过期时,DNS 中的记录会被更新,但是,在一段时间内,链中某处的 DNS 可能会返回可能已过时的缓存响应,这将导致使用该响应的任何客户端都被路由到错误的主机,这解释了为什么您的网站可能会出现故障 - 您的浏览器使用的 DNS 服务器可能还不知道您网站的 DNS 记录的更改

Networking is not my specialty area so there is a chance tis may be somewhat incorrect, but I believe it to be at least somewhat accurate.

Most nameservers have authority over a very small section of the internet (like a single domain). For areas where they are not the authority they ask other nameservers until they get an authoritative response.
Some nameservers also cache non-authoritative responses so they aren't continually asking for the same info from other nameservers.

A record in DNS is updated when the cached response expires, however there is a chance that, for a time, a DNS somewhere in the chain could return a cached response that could be stale which would result in any client that used that response being routed to the wrong host which explains why your web site may appear down - the dns server your browser is using may not be aware of the change to your site's DNS records yet

剩余の解释 2024-09-23 15:07:57

简短回答:不,DNS 服务器对连接没有直接影响,这是新服务器上的配置错误(或 IP 拼写错误)。

长答案:不,DNS 服务器将返回旧的 DNS 记录或新的 DNS 记录(分别为旧服务器、新服务器),而不是两者或其中之一,仅返回一个。我会检查新的 DNS 记录是否有拼写错误和服务器配置(即 VirtualHost 部分)。

您可以检查路由器缓存的 IP:

  1. 输入命令提示符
  2. nslookup
  3. 在您的域名中

类型nslookup 应该会查询您的路由器。非权威答案是在缓存条目过期之前您将得到的答案。

Short answer: No, DNS servers have no direct effect on connecting, it's a misconfiguration on your new server (or a typo in IP).

Long answer: No, DNS servers will either return the old DNS record or the new DNS record (old server, new server respectively), not both or either, just the one. I would check new DNS record for typos and the server config (namely the VirtualHost section).

You can check which IP is the one cached by router:

  1. entering command prompt
  2. nslookup
  3. type in your domain name

nslookup should be querying your router. The non-authoritative answer is the one you will get until the cached entry expires.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文