-1

When typing 1.1.1.1 in address bar of a browser it opens up https://1.1.1.1/, This is first time I saw .1 top level domain so I looked it up on various domain registrars. I could not find it so I checked if was actually a TLD on iana.org and wikipedia.org. It does not seem to be a top level domain so I went back and checked TLS certificate which was issued to https://cloudflare-dns.com/ So I thought it was maybe a clever JavaScript hack which changes URL after page load but then I checked network requests and they seem to have 1.1.1.1 as domain name too (shown below)

Request URL: https://1.1.1.1/
Request Method: GET
Status Code: 200 
Remote Address: 1.1.1.1:443

How does cloudflare do this?

1 Answers1

0

I saw .1 top level domain

It is not.

1.1.1.1 is an IPv4 address, that is all. Nothing more, nothing less. And the website on it has a certificate with the IP address, which is possible, yet rare.

When you use any URL, with an hostname, that hostname is converted to an IP address and the browser connects to it. You can however put an IP address directly in an URL in which case the browser connects to it directly, it skips the DNS resolution of name to IP address.

Numerical TLD are forbidden by current ICANN rules, exactly to disambiguate them with IP addresses.

See my longest explanation at Number in the top-level domain? about TLDs and numbers in them.

How does cloudflare do this?

Anyone could do exactly the same as them, but with obviously less usefulness. Just make sure to create the proper certificate, some CAs allow to provide certificates on IP addresses, but not all of them, and it is not the standard case. The webserver should also be configured accordingly, to accept an IP address in the URL where it would expect an hostname to be able to serve the proper website, especially if multiple ones are on the host (in which cases for HTTPS you need separate IP addresses, one per website).

Patrick Mevzek
  • 7,662
  • 15
  • 28
  • 43