Github pages 404 if accessed by entering ip in browser address bar
When we enter hostname in browser address bar, after resolving hostname to ip, the browser also sends the hostname in http header to the resolved ip. This will enable using one ip to serve multiple websites.
# NOTE: use `dig githubutilities.github.io` to resolve hostname to ip(`126.96.36.199`) curl -I 188.8.131.52 # vs curl -I 184.108.40.206 --header "Host: githubutilities.github.io"
github.io pages is actually a
github.map.fastly.net., which is used by github to route the traffics.
Answer Section: Five output column fields in Answer Section
| NAME | TTL | CLASS | TYPE | IP |
TTL is use to cache the results.
SOA: Is the zone synchronized to all my NS ?
serial number which will be incremented on each update of SOA response.
dig google.com +nssearch | cut -d ' ' -f 4 | sort | uniq -c
PTR: Reverse lookup a ip
Mail servers like AOL might use PTR records to verify incoming mail address identities.
# reverse dig ip dig -x <ip>
ip redirecting is based on http headers(Location: http://www.google.com/`)
baidu.comip redirecting is based on http
DNS recursive lookup: Trace delegation path
+trace option in
A - IPv4 IP address
AAAA - IPv6 IP address
CNAME - Canonical name record (Alias)
NS - Name Servers
MX - Mail eXchanges
PTR - PoinTeR record. Pointer to a canonical name
SOA - Start Of Authority. Authoritative information about a DNS zone
TXT - text record
Basic terms about DNS
visit google domain for more infos.