【问题标题】:Can't access my website via domain name anymore无法再通过域名访问我的网站
【发布时间】:2020-05-29 20:19:24
【问题描述】:

几个月前,我在 Google Cloud Platform 上创建了一个基于 KeystoneJS 的网站。

IP 地址 (IPv4):35.209.129.188:3000

域名:seebelarus.by

我没有做任何事情,我没有更改任何设置,但现在我无法通过域名访问我的网站。只有IP。有什么方法可以查看更改了哪些设置以及如何修复它?

以下是有关 DNS 的信息:

【问题讨论】:

  • 它的域名现在是'188.129.209.35.bc.googleusercontent.com'。能否请您发送此命令的输出 cat /etc/hosts cat /etc/hostname.
  • 188.129.209.35.bc.googleusercontent.com 它是一个PTR record,用于不同的目的。

标签: google-cloud-platform google-compute-engine keystonejs


【解决方案1】:

此问题的原因是从注册商的 DNS 服务器切换到 Google Cloud DNS 时 DNS 配置错误。目前没有您的域seebelarus.by 的 NS 记录:

$ dig NS seebelarus.by @8.8.8.8

; <<>> DiG 9.11.3-1ubuntu1.12-Ubuntu <<>> NS seebelarus.by @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 19578
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;seebelarus.by.                 IN      NS

;; Query time: 123 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu May 28 12:57:06 UTC 2020
;; MSG SIZE  rcvd: 42

$ dig NS seebelarus.by @8.8.4.4

; <<>> DiG 9.11.3-1ubuntu1.12-Ubuntu <<>> NS seebelarus.by @8.8.4.4
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 12620
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;seebelarus.by.                 IN      NS

;; Query time: 85 msec
;; SERVER: 8.8.4.4#53(8.8.4.4)
;; WHEN: Thu May 28 12:57:15 UTC 2020
;; MSG SIZE  rcvd: 42

$ dig NS seebelarus.by @1.1.1.1

; <<>> DiG 9.11.3-1ubuntu1.12-Ubuntu <<>> NS seebelarus.by @1.1.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 14617
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1452
;; QUESTION SECTION:
;seebelarus.by.                 IN      NS

;; Query time: 727 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Thu May 28 12:57:21 UTC 2020
;; MSG SIZE  rcvd: 42

此域由Open Contact, Ltd注册:

$ whois seebelarus.by
Domain Name: seebelarus.by
Registrar: Open Contact, Ltd
Person: HIDDEN!
Email: HIDDEN! Details are available at http://www.cctld.by/whois/
Name Server: ns1.domain.by
Name Server: ns2.domain.by
Updated Date: 2019-11-07
Creation Date: 2015-05-03
Expiration Date: 2021-05-03

-------------------------------------------
Service provided by Reliable Software, Ltd.

要解决您的问题并切换到 Google Cloud DNS,您应该按照以下步骤操作:

  1. 转到 registrar's domain control panel 并为您的域设置新的 DNS 服务器,您应该替换您的域:

    ns1.domain.by
    ns2.domain.by
    

    与:

    ns-cloud-b1-googledomains.com
    ns-cloud-b2-googledomains.com
    ns-cloud-b3-googledomains.com
    ns-cloud-b4-googledomains.com
    
  2. 转到 Google Cloud DNS 并从区域中删除 NS 记录:

    ns1.domain.by
    ns2.domain.by
    

    你不再需要它们了,应该只有与 Google NS 相关的记录:

    ns-cloud-b1-googledomains.com
    ns-cloud-b2-googledomains.com
    ns-cloud-b3-googledomains.com
    ns-cloud-b4-googledomains.com
    

    保持A 记录不变,现在是为www.seebelarus.by 添加CNAME 记录的好时机。

您可以在文档Cloud DNS Quickstart 中找到更多详细信息。

之后,您应该等待 24-48 小时才能收到 DNS propagation。您可以使用dnsmap.iohttps://dnschecker.org/ 或类似工具等在线工具检查您的域的 DNS 传播状态。

更新

DNS 配置现在看起来不错:

$ whois seebelarus.by
Domain Name: seebelarus.by
Registrar: Open Contact, Ltd
Person: HIDDEN!
Email: HIDDEN! Details are available at http://www.cctld.by/whois/
Name Server: ns-cloud-b1.googledomains.com
Name Server: ns-cloud-b2.googledomains.com
Name Server: ns-cloud-b3.googledomains.com
Name Server: ns-cloud-b4.googledomains.com
Updated Date: 2020-05-29
Creation Date: 2015-05-03
Expiration Date: 2021-05-03

$ dig NS seebelarus.by

; <<>> DiG 9.11.3-1ubuntu1.12-Ubuntu <<>> NS seebelarus.by
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56451
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494

;; QUESTION SECTION:
;seebelarus.by.                 IN      NS

;; ANSWER SECTION:
seebelarus.by.          21599   IN      NS      ns-cloud-b1.googledomains.com.
seebelarus.by.          21599   IN      NS      ns-cloud-b2.googledomains.com.
seebelarus.by.          21599   IN      NS      ns-cloud-b3.googledomains.com.
seebelarus.by.          21599   IN      NS      ns-cloud-b4.googledomains.com.

;; Query time: 21 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Fri May 29 12:16:46 UTC 2020
;; MSG SIZE  rcvd: 163

$ host seebelarus.by
seebelarus.by has address 35.209.129.188

【讨论】:

  • 非常感谢!我从domain.by收到了域名,所以我想我需要指定NS记录:ns1.domain.by ns2.domain.by
  • 您是否更改了注册商的设置?如我所见,您仍然有这个问题。
  • 在这里提问之前我什么都没做。我听从了您的建议,现在我正在等待 24-48 小时
  • 感谢您的确认。如果我的回答对您有帮助,请接受或投票赞成以使其对社区更有帮助。
【解决方案2】:

查找您的域名后没有找到DNS结果,您必须在域名配置中检查您的DNS并使用该IP地址设置A记录。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-07-08
    • 2013-10-04
    • 2017-11-20
    • 2015-05-06
    • 1970-01-01
    • 1970-01-01
    • 2019-02-08
    • 2021-03-03
    相关资源
    最近更新 更多