[root@host ~]$ curl -v http://.
* About to connect() to . port 80 (#0)
* Trying 127.0.0.1...
* Connected to . (127.0.0.1) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: .
> Accept: /
>
< HTTP/1.1 400 Bad Request
< Date: Sat, 15 Aug 2020 15:38:54 GMT
< Server: Apache
< Content-Length: 347
< Connection: close
< Content-Type: text/html; charset=iso-8859-1
<
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
<p>Additionally, a 400 Bad Request
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
* Closing connection 0
# cat named.conf.local
zone "." {
type master;
file "/etc/bind/db.root";
};
# cat db.root
$TTL 60
@ IN SOA localhost. root.localhost. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS .
@ IN A 209.216.230.240
# dig a .
...
;; QUESTION SECTION:
;. IN A
;; ANSWER SECTION:
. 60 IN A 209.216.230.240
# wget http://./
--2020-08-17 09:38:26-- http://./
Resolving . (.)... 209.216.230.240
Connecting to . (.)|209.216.230.240|:80... connected.
HTTP request sent, awaiting response... 400 Bad Request
2020-08-17 09:38:26 ERROR 400: Bad Request.Doing a dig, there are no A records for . but they do provide NS records obviously, for all the other TLDs to resolve.
Devilish detail is probably in the RFC and likely implementation specific also, as to whether they accept it is a valid request or fail before trying.
dig A .
; <<>> DiG 9.11.5-P4-5.1-Debian <<>> A . ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26280 ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION: ;. IN A
;; Query time: 3 msec ;; SERVER: 192.168.1.254#53(192.168.1.254) ;; WHEN: Sat Aug 15 18:19:41 BST 2020 ;; MSG SIZE rcvd: 17