Whether you have encountered such a situation when surfing the Internet: QQ can normally send messages, but the web page is not open, check the network connection and normal display. In the face of this situation many small partners feel a little helpless. So what’s the deal? What’s going on here?

Internet search learned that under normal circumstances the computer is automatically obtain DNS server, no manual setting, but in some special cases, did not obtain the DNS server, or the server failure, then we need to manually replace the DNS to ensure normal access to the web page. The failure is caused by incorrect DNS configuration. You can modify the DNS to solve the problem.

So where is DNS, and how can it be changed?

What is the DNS

The Domain Name System (DNS) is short for Domain Name System. It is one of the foundations of the Internet, used to map domain names to IP addresses, much like people’s names to phone numbers in cell phone directories. When we enter a Web address in a browser, it can be translated into the IP address of the associated server through a DNS query. Without DNS, we would need to remember the IP address of each site to access it.

This was relatively easy to do in the early days of the Internet, when it was easy to map a particular IP address to a particular computer and access a website by typing a particular IP address directly into a browser. Later, as more and more devices and people joined the growing network, more and more IP, memory became a huge burden, netizens all wanted an easier to remember the words of the address, hence the domain name.

In the 1970s and early 1980s, these names and addresses were assigned by a single person (Elizabeth Feinler of Stanford University) who maintained a master list of all computers connected to the Internet in a text file called hosts.txt.

Obviously with the development of the Internet, this is an untenable situation, more and more addresses can not be maintained by one person. So in 1983, Paul Mockapetris, a researcher at the University of Southern California, developed the original domain name system, which he named DNS. Although much has changed since then, DNS still fundamentally works the same way it did 40 years ago.

Before we understand how DNS works in the network, let’s take a look at the categories of DNS.

DNS Server Types

All DNS servers fall into one of four categories: recursive resolvers, root DNS servers, TLD DNS servers, and authoritative DNS servers. In a typical DNS lookup, these four DNS servers work together to provide the IP address of the specified domain to the client.

DNS recursive resolver

Recursive resolvers (also known as DNS resolvers) are the first stop in DNS queries. It belongs to the middleman between the client and the DNS domain name server. Upon receiving a request for a DNS query from a Web client, the recursive resolver responds with cached data or sends a request to the root DNS server, then another request to the TLD DNS server, and then a final request to the authoritative DNS server. Upon receiving the response from the authoritative DNS server containing the requested IP address, the recursive resolver sends the response to the client.

During this process, the recursive parser caches the information received from the DNS server. When the domain NAME IP address requested by one client is the most recently requested IP address by another client, the parser can bypass the process of communicating with the DNS server and provide the requested record to the client from the cache.

DNS Root DNS server

Each recursive parser knows the 13 DNS root DNS servers, which are the first stop for the recursive parser to search for DNS records. The root server accepts queries from a recursive resolver that contains a domain name, and the root server responds by directing the recursive resolver to the TLD domain name server based on the domain extension (.com,.net,.org, etc.). The root DNS server is overseen by a nonprofit group called the Internet Corporation for Assigned Names and Numbers (ICANN).

TLD Domain name server

The Top Level Domain maintains information about all Domain names that share common Domain extensions, such as.com and.net. For example, the.com TLD domain name server contains information about every web site that ends in “.com “. If the user is searching upyun.com, upon receiving a response from the root DNS server, the recursive resolver will send a query to the.com TLD DNS server, which will respond through the authoritative DNS server for that domain.

Authoritative domain name server

When the recursive parser receives a response from the TLD DNS server, the response directs the parser to the AUTHORITATIVE DNS server. An AUTHORITATIVE domain name server is usually the last step in the process for a parser to find an IP address. The authoritative name server contains domain-specific information (for example, upyun.com), and it provides the recursive parser with the server IP address found in DNS A records. Or if the domain has A CNAME (alias) record, it will provide A recursive parser with an alias field, in which case the recursive parser will have to perform A brand new DNS lookup to get the record (usually A record containing an IP address) from an authoritative DNS server.

DNS record

DNS records are indispensable in an authoritative domain name server.

DNS records (aka zone files) are instructions located in an authoritative DNS server that provide information about a domain, including which IP addresses are associated with the domain and how requests to the domain are handled. In addition, all DNS records have a “TTL,” which represents the time to live and indicates how often the DNS server refreshes the record.

Common DNS records are as follows:

  • A Record: Saves A record of domain IP addresses.

  • CNAME record: alias that forwards one domain or subdomain to another domain without providing an IP address.

  • MX logging: Directs messages to the E-mail server.

  • TXT record: enables the administrator to store text comments in the record.

  • NS record: Name server that stores DNS entries.

  • SOA record: Management information of a storage domain.

  • SRV record: Specifies the port used for a particular service.

  • PTR record: Provide domain name in reverse query.

A record and CNAME are the most commonly used records for resolving domain names.

The DNS A record

The “A” stands for “address,” the most basic type of DNS record, which indicates the IP address of the domain. For example, extracting the DNS record for upyun.com, whose “A” record currently returns IP address 115.231.97.2. The “A” record stores only IPv4 addresses, and if the site has IPv6 addresses, it will use the “AAAA” record.

DNS CNAME record

When A domain or subdomain is an alias for another domain, use the canonical name record instead of the A record. Suppose www.example.com has a CNAME record with a value of “example.com”. This means that when the DNS server accesses DNS records for www.example.com, it actually triggers another DNS lookup on example.com, returning the IP address of example.com. All CNAME records must refer to a domain, not an IP address.

For CDN, the A record is completely insufficient due to the existence of nodes all over the CDN. In addition, the node needs to change constantly based on the local DNS location and carrier. Therefore, using CNAME records for domain name resolution is a very convenient management method. After the alias is recorded, you do not have to worry about how the IP address of the node changes.

How DNS works

Knowing that there are several types of DNS, we can take a look at how DNS works.

Each Internet access device is assigned an IP address. When a user enters a domain name in a Web browser, the client computer initiates a request. After that, the DNS queries the IP address of the corresponding server through a process called DNS resolution. In particular, if you have accessed the domain name once before, your local cache will skip some steps in the DNS lookup process to make the lookup faster.

A complete DNS lookup requires the following steps:

  • For example, to access upyun.com, enter upyun.com in the browser. The query is transmitted to the Internet and received by the DNS recursive resolver.

  • Query DNS root DNS server (.) .

  • The root server responds to the parser with the address of the TLD domain name server (.com) that stores its domain information. When searching upyun.com, our request points to.com TLD.

  • The parser makes a request to the.com TLD.

  • The TLD server then responds with the IP address of upyun.com, the domain name server for that domain.

  • The recursive resolver sends the query results to the domain’s DNS server.

  • The IP address of upyun.com is then returned to the resolver from the DNS server.

  • The DNS resolver responds to the Web browser with the IP address of the domain originally requested.

After returning to the IP address of upyun.com with these steps of DNS lookup, the browser can make a request for the page:

  • The browser sends an HTTP request to the IP address.

  • The server at that IP returns the web page to the browser (step 10).

After reading the introduction of DNS, you are not already understanding DNS, understand DNS, and then encounter unable to access the web page, you can modify DNS to solve the problem. Is it simple and convenient?

Recommended reading

Page does not pop up? It was hijacked!

The easiest password to steal. Did you get it?