Abstract


Limitation

Solution

Create a mapping between hostname and IP Address using DNS. IP Address is capable of solving the limitation of hostname but not human-readable which is mitigated by DNS

localhost and 127.0.0.1 aren't interchangeable

While playing with socket programming, I noticed an interesting behaviour about localhost. It is actually a hostname that needs to be resolved into an IP address, and it usually resolves to IPv6 (::1) before IPv4 (127.0.0.1). This leads to two issues:

  1. This introduces some latency. When a client tries to connect, it will attempt IPv6 first.
  2. If the server app isn’t listening on IPv6 and nothing actively rejects the connection. Instead of failing fast, the client just waits and times out after up to seconds (which is insanely slow, given a normal http request takes a few ms), then it falls back to IPv4 and connects successfully.

Canonical Hostname (CNAME)

  • A less readable Hostname
  • For example, my blog CNAME isd29nyp1p0lllzw.cloudfront.net

Alias Hostname

Domain Name


  • Examples are notes.yxy.ninja and google.com etc

Domain Name Transfer

Transferring from one Domain Registrar to another. The general steps:

  1. Disable DNSSEC
  2. Unlock Domain
  3. Request an authorization code, also known as EPP Code
  4. Initiate transfer to the new Registrar with the EPP Code
  5. The old registrar sends a transfer confirmation email, confirm it

Refer to Cloudflare Docs for more details

Caution

For DNS Record for Domain ownership verification, we can’t proxy it, the Certificate Authority (CA) wants to the see the verification text in the DNS record!

Check Whois info

You can either use the command whois <DOMAIN_NAME/IP_ADDRESS> or use this whois web app.

Domain Registrar

Domain Zone File

EPP Code

  • Alpha-numeric code required to transfer domain from one registrar to another registrar