Abstract
- Human-readable names given to the Host
- Domain Name, Canonical Hostname (CNAME) and Alias Hostname are all considered as hostname
Limitation
- Doesn’t contain enough information to locate the Host on the Internet
- Difficult to be processed by Network Router
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
and127.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:
- This introduces some latency. When a client tries to connect, it will attempt IPv6 first.
- 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 is
d29nyp1p0lllzw.cloudfront.net
Alias Hostname
- A more readable Hostname, usually aliasing to Canonical Hostname (CNAME) or IP Address
Domain Name
- Examples are
notes.yxy.ninja
andgoogle.com
etc
Domain Name Transfer
Transferring from one Domain Registrar to another. The general steps:
- Disable DNSSEC
- Unlock Domain
- Request an authorization code, also known as EPP Code
- Initiate transfer to the new Registrar with the EPP Code
- 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
- The platform between the domain owner and Top-Level Domain DNS Server, for example Cloudflare Registrar
Domain Zone File
- The file we can use to configure the Domain Name
EPP Code
- Alpha-numeric code required to transfer domain from one registrar to another registrar