Understand the DNS record step by step and handle it correctly
What is the purpose of a DNS record? How to use it correctly?
In order for a website to be accessible online, a DNS entry must be made. The DNS entry establishes the connection between the IP address from the hosting and the domain name. Which entries can be made and what they are for is explained in this article.
How to put a website online?
For this you need a domain name and a hosting (hosting = a computer on which the website data is stored and which is always connected to the Internet).
In the hosting you put the website contents into a folder that is shared for access via the Internet. After that, the domain name and the hosting have to be connected. This is done via the DNS, which is entered on a name server. A name server manages several DNS entries of several domains.
At the domain registrar, where you have registered the domain name, you can enter the name server details. E.g. ns.yourprovider.net. At least 2 nameservers are expected, so that in case of failure of one nameserver an alternative exists as backup. If the name server entries are entered at the domain and the DNS is configured correctly, the website can be accessed via a web browser. The name server is maintained by the hosting provider. It is therefore part of the technical infrastructure of the hosting.
How to query the DNS record?
On Windows, the command line window can be opened with “cmd” in the search field.
Then the DNS can be queried by entering “nslookup -q=any DOMAINNAME”.
A DNS entry can look like this:
@ 1440 IN SOA ns.ch-inter.net. hostmaster.provider.com. (1440) ; Minimum TTL, seconds
IN NS ns.provider.net.
IN NS ns2.provider.net.
IN MX 10 mx01.provider.net.
IN TXT "v=spf1 a mx include:_spf.provider.net ~all"
IN A 184.108.40.206
beispiel IN CNAME anderedomain.net.
The MX record defines where the mail server is located. Here mx02.sui-inter.net, mx01.sui-inter.net and mx03.provider.net. Typically the configuration for office 365 is done here.
A TXT entry is a freely definable text. Here a SPF entry was made. This defines which zones are allowed to send mails with the domain extension as sender. With this entry it can be said on DNS level whether an e-mail comes from a permitted sender mail server and thus should not end up in spam. Since every email gets a spam value this is not a guarantee, but a common way to improve the delivery of mails.
The A entry defines the IP from the hosting where the website is located. Here it is the IP 220.127.116.11. Per IP several hostings can be defined. The request will be sent to this IP and the hosting management (e.g. Plesk, cPanel) will then take care of the forwarding.
A CNAME entry refers from one name to another name. E.g. a subdomain example.gally-websolutions.com which redirects to anderedomain.net. So with CNAME redirections can be defined. In the example above none is shown. This is due to the fact that with the above query no complete DNS information can be obtained. The best way to get the full DNS extract is to contact the hosting provider directly via a support request.
DNS records have a TTL value. In the example above default TTL = 1440. TTL stands for time to live, which means lifetime of the entry or expiration date. A TTL value of 1440 means 1440 seconds or 24 minutes. The internet is a network and so each device can decide when to query again if something has changed in the configuration. In this way, resources can be saved.
This can lead to delays when switching on or especially when adapting the DNS. It therefore makes sense to set the TTL value as low as possible for planned changes, so that this then takes effect directly during the changeover. TTL values of several hours are not uncommon here. With the entry above it is 24 minutes, which thus leads to the fact that every 24 minutes the entry is to be queried again, if a device has already received this information.
In what situation are DNS records typically modified?
- Web page launching
- Change from mail server.
- TXT entries for domain verification
- Spam settings for e-mail sending
- Redirections of subdomains
- Setting of Voice over IP systems
- Configuration of Office 365
What are the potential problems with the DNS entry?
- Misspellings in the entry
- Incorrect redirections that lead to errors
- Conflicting configurations that lead to conflicts
- Duplicate configurations. The same entry twice but slight differences.
- Obsolete configurations that should no longer be valid.
Recommendation: DNS adjustments should be carried out by specialists.
The DNS is a central element for the operation of a domain. Accurate operation is important here. Incorrect DNS entries can paralyze your website and your e-mail operation. For technical information, please contact your hosting provider, IT support or web agency.
In this article the practical use of DNS entries will be explained with the help of examples. For basic information with explanations of technical terms I recommend the Wikipedia article (https://en.wikipedia.org/wiki/Domain_Name_System)
Comments are closed.