7 misunderstandings of DNS resolution
DNS resolution is generally considered as providing mapping between domain name and IP address, for example www.google.com maps to 18.104.22.168. There are two important reasons for doing DNS resolution:
- IP address is hard to remember, while domain name is human friendly
- Virtual host may access different contents according to the header of the host domain name(sub-domain name)
Some webmasters may have some unreasonable requirements when doing DNS resolution. It mainly because they are not very clear about DNS. Here are some frequently seen misunderstandings about DNS resolution.
1. Please resolve example.com:8080
DNS resolution doesn't contain port, in a DNS system, it only provides the mapping from example.com to some IP address, it will not contain the port number. If you want to have the web browser to listen to 8080 on example.com, you should configure the web server's rewrite rule.
2. Please resolve host_a.example.com
This is an invalid domain name, domain name cannot contain underscore, it can contain alphabet, number and hyphen.
One kind of domain name can contain underscore which is SVAR record, it will not be discussed here.
3. Please resolve example-host
This is a hostname but not a valid domain name, it cannot be resolved.
4. After DNS resolution, can ping successfully, but cannot open the website
This is not related to DNS, it may because the web server's virtual host is not configured. For example example.com is resolved to an IP address of some virtual host provider, it still needs the service provider to configure the virtual host for you.
5. When accessing www.a.com, it redirects to www.b.com automatically
It's not related to DNS resolution as well, please configure web server's rewrite rule.
6. Please resolve http://example.com/party/ to some IP address
This is an incomplete URL, not a domain name, domain name only contains example.com. If you want to route to some server based on the request path, for example, route /bbs/ to one host, /news/ to another host, then please configure web server or proxy server.
7. DNS is effective immediately
For standard DNS system like DNSbed, the newly added domain will be effective immediately. The time when the domain will be effective depends on the TTL settings of the original domain.
For example example.com, if the original TTL for it is 600 seconds, then when it is resolved to a new IP, it willwait for 600 seconds so that example.com will map to the new IP.
Reference : http://www.nsbeta.info/archives/320
It's a sarcastic picture describing how heavy the haze is in Beijing on Christmas day. Every winter people in Beijing will suffer the heavy haze.