A domain is resolved into an IP address using the Domain Name System (DNS). The principle can be compared to a phonebook in which names of persons can be resolved into telephone numbers.
The Domain Name System made sense with the growing number of IP addresses, as it is easier to remember a name than a combination of numbers. The principle still proves to be useful, as the IP version 6 has an even larger address range.
Basically, you establish a connection to a server via IP, which is why a query to a name server must be started before each request for a name (domain).
An example:
You enter the page www.google.com via your browser. In this scenario, the following happens:
- You type www.google.com in your browser and confirm with Enter
- Your PC sends a request to the first responsible name server. In a household, the task of name resolution is usually taken over by the home router (for example your FritzBox).
- If your home router does not yet know the IP to the address, he will ask the name servers of your provider. Otherwise, he returns the already known IP address to the domain www.google.de to your PC.
- Your PC will now connect to the server using the IP returned by the name server
Conclusion
Communication on the Internet takes place via IP. The Domain Name System makes it easier to remember IP addresses.
There are a number of different information that can be entered in the DNS. The most common are:
A-Record
Dieser Eintrag löst einen Namen in eine IPv4 Adresse auf.
(e.g. www.google.de → 123.123.123.123)
AAAA-Record
This entry resolves a name to an IPv6 address.
(e.g. www.google.de → ab:9eff:c532:7:ab:9eff:c532:7)
CNAME-Record
This entry resolves to another domain name. This is to be understood as a kind of "forwarding". Which IP resolves depends on the entry for the domain being resolved. (e.g., other-page.google.com → www.google.com)
MX-Record
This entry indicates which e-mail server is responsible for the e-mails of this domain. By priority, backup mail servers can be configured. The mail server with the highest priority (smaller number) will be dialed first. If this is not available, the server with the second highest priority is selected, etc.