我已将Cloud DNS配置为在Google数据存储上提供静态网站,以测试其正常工作。我已经成功地配置了一个例外。
我可以通过
访问我的网站www.example.com。(注意尾随点)
我希望它可以在
访问www.example.com (不带尾点,但不是)
受管区域会自动添加尾随点,因此我无法对其进行编辑(因为这意味着其为绝对域)。在CNAME上,我对其进行了如下配置:
我毫不奇怪,我对Cloud DNS在此问题上的工作原理感到有些困惑。
编辑:以@PatrickMezvek的身份指出混淆。域名是www.scolacademy.com。 link
我尝试 nslookup ,并且一切正常:
>> nslookup www.scolacademy.com
Server: 216.230.147.90
Address: 216.230.147.90#53
Non-authoritative answer:
www.scolacademy.com canonical name = c.storage.googleapis.com.
c.storage.googleapis.com canonical name = storage.l.googleusercontent.com.
Name: storage.l.googleusercontent.com
Address: 172.217.3.144
>> nslookup www.scolacademy.com.
# Same output
对于挖掘 :(两个域,带/不带尾点)
; <<>> DiG 9.10.6 <<>> www.scolacademy.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11676
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;www.scolacademy.com. IN A
;; ANSWER SECTION:
www.scolacademy.com. 182 IN CNAME c.storage.googleapis.com.
c.storage.googleapis.com. 3060 IN CNAME storage.l.googleusercontent.com.
storage.l.googleusercontent.com. 149 IN A 172.217.3.144
;; Query time: 21 msec
;; SERVER: 216.230.147.90#53(216.230.147.90)
;; WHEN: Thu Apr 04 09:14:36 CST 2019
;; MSG SIZE rcvd: 141
两个域都可以在iOS 12.2中使用。在Chrome(73.0.3683.86)(与Firefox和Safari相同)上却没有。以下是Web浏览器的屏幕截图:
答案 0 :(得分:0)
尾随点是FQDN的一部分,它表示Internet域名层次结构系统中的“根区域”。因此,从上到下是“ .dot”表示根,然后是顶级域名,例如“ com”或“ org”,然后是公司或组织的域名“ google”,以及子域名“ www”。但是通常我们不需要在域名末尾键入“。”,因为系统会自动添加它。 我猜您的域当时无法使用,因为根据您的屏幕截图,CNAME记录TTL为5分钟。传播到您向其发送请求的DNS服务器将花费一些时间。 因此,如果您现在尝试使用域名,它应该可以使用结尾的句点。
有关FQDN的详细信息,请参考以下链接: https://en.wikipedia.org/wiki/Fully_qualified_domain_name
答案 1 :(得分:0)
您的CNAME似乎正常运行,所以我看不到您的问题在哪里:
$ dig www.scolacademy.com. +noall +answer
; <<>> DiG 9.12.0 <<>> www.scolacademy.com. +noall +answer
;; global options: +cmd
www.scolacademy.com. 5m IN CNAME c.storage.googleapis.com.
c.storage.googleapis.com. 1h IN CNAME storage.l.googleusercontent.com.
storage.l.googleusercontent.com. 4m45s IN A 172.217.164.176
HTTP可以使用或不使用结尾点,由于证书问题,HTTPS在两种情况下均不起作用。
$ wget -S -O /dev/null https://www.scolacademy.com/
--2019-04-04 10:05:26-- https://www.scolacademy.com/
Resolving www.scolacademy.com (www.scolacademy.com)... 172.217.164.176
Connecting to www.scolacademy.com (www.scolacademy.com)|172.217.164.176|:443... connected.
ERROR: no certificate subject alternative name matches
requested host name ‘www.scolacademy.com’.
To connect to www.scolacademy.com insecurely, use `--no-check-certificate'.
$ wget -S -O /dev/null https://www.scolacademy.com./
--2019-04-04 10:05:32-- https://www.scolacademy.com./
Resolving www.scolacademy.com. (www.scolacademy.com.)... 172.217.164.176
Connecting to www.scolacademy.com. (www.scolacademy.com.)|172.217.164.176|:443... connected.
ERROR: no certificate subject alternative name matches
requested host name ‘www.scolacademy.com’.
To connect to www.scolacademy.com. insecurely, use `--no-check-certificate'.
$ wget -S -O /dev/null http://www.scolacademy.com./
--2019-04-04 10:06:55-- http://www.scolacademy.com./
Resolving www.scolacademy.com. (www.scolacademy.com.)... 172.217.164.144
Connecting to www.scolacademy.com. (www.scolacademy.com.)|172.217.164.144|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
X-GUploader-UploadID: AEnB2Upc9_GNBAVPkyjjomj_pEp6QsakmVqx3rBnVYq-SoyJPRHGvo191ATaxx5ao3dEuVbkW7pWFyENN2rNEUEnezERTfYs6g
Expires: Thu, 04 Apr 2019 15:06:56 GMT
Date: Thu, 04 Apr 2019 15:06:56 GMT
Cache-Control: private, max-age=0
Last-Modified: Fri, 15 Feb 2019 06:13:22 GMT
ETag: "9ec985ae3f1c1158205025e7925342e4"
x-goog-generation: 1550211202935263
x-goog-metageneration: 1
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 3704
Content-Type: text/html
x-goog-hash: crc32c=uC9tbQ==
x-goog-hash: md5=nsmFrj8cEVggUCXnklNC5A==
x-goog-storage-class: MULTI_REGIONAL
Accept-Ranges: bytes
Content-Length: 3704
Server: UploadServer
Length: 3704 (3.6K) [text/html]
Saving to: ‘/dev/null’
/dev/null 100%[=============================================================================================================>] 3.62K --.-KB/s in 0.003s
2019-04-04 10:06:56 (1.13 MB/s) - ‘/dev/null’ saved [3704/3704]
$ wget -S -O /dev/null http://www.scolacademy.com/
--2019-04-04 10:06:59-- http://www.scolacademy.com/
Resolving www.scolacademy.com (www.scolacademy.com)... 172.217.164.144
Connecting to www.scolacademy.com (www.scolacademy.com)|172.217.164.144|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
X-GUploader-UploadID: AEnB2UqmISfLaNCIpHL2gVajP2g-8xee1sroWNzJ_UVq50EJh17tDDurR_tv99J9_UVZNhr00uhxDdiLE3SA7xRgNONyq5MnWg
Expires: Thu, 04 Apr 2019 15:06:59 GMT
Date: Thu, 04 Apr 2019 15:06:59 GMT
Cache-Control: private, max-age=0
Last-Modified: Fri, 15 Feb 2019 06:13:22 GMT
ETag: "9ec985ae3f1c1158205025e7925342e4"
x-goog-generation: 1550211202935263
x-goog-metageneration: 1
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 3704
Content-Type: text/html
x-goog-hash: crc32c=uC9tbQ==
x-goog-hash: md5=nsmFrj8cEVggUCXnklNC5A==
x-goog-storage-class: MULTI_REGIONAL
Accept-Ranges: bytes
Content-Length: 3704
Server: UploadServer
Length: 3704 (3.6K) [text/html]
Saving to: ‘/dev/null’
/dev/null 100%[=============================================================================================================>] 3.62K --.-KB/s in 0.005s
2019-04-04 10:06:59 (768 KB/s) - ‘/dev/null’ saved [3704/3704]
由于您没有显示所做的特定测试,因此无法得出结论,因此没有人知道您所看到的内容。但是看来一切正常(您只需要解决证书问题)