What is DNS?
A TLD is the last and most rightmost part of a domain name. So, for example, the TLD of medium.com is .com. However,.passionaly a gTLD (Generic Top Level) and a ccTLD (Country Code Top Level Domain) shall be distinguished between. Previously, it was claimed that a gTLD should help users to identify what a specific domain name could be used for. as an example, a .com would be appropriate for business or commercial matters, a .org for a organization, and an .edu would be rambled by educational institutions and a .gov listed under government affairs. A ccTLD was almost always for geographic usage. An example will be, .ca for Canadian web sites, .co.uk for British web sites and so on.This is the reason for why there is a stampede of different new gTLDs such as. online, .club, .website etc.
Domain Hierarchy :
Second-Level Domain :
To illustrate this point, the .com part is the TLD. instead of using the entire domain “medium.com”, the user will be given a for instance, ‘medium’ as the Second Level Domain. In a situation where a domain name is being designed, this second-level domain is generally allowed 63 sixty-three characters plus this TLD and letters a-z, the numbers, and hyphen. Hyphens cannot be the first letters and the last letters and cannot be repeated.
Subdomain :
And for this sub domain, come closer to the left hand side of the Second Level Domain separated also by a full stop for example in the name admin.medium.com the admin part is the sub domain. However, the same restrictions of a Second Level Domain also applies to sub domain name creation whereby the sub domain also consists of Limited number of 63 characters and letters a-z and numbers 0–9 and one hyphen. You can also include periods to combine the sub domains in order to make longer sub domain names e.g. jupiter.servers.medium.com. But the maximum must not be more than 253 characters. There is no limit to the sub domains that are created under the domain name.
Different DNS Record Types
Just because the primary meta of DNS is the websites does not mean that there are only different classes of DNS record. We will now discuss some of the common ones that you are most likely to find in use.
A Record:
These records point to IPv4 addresses, for example 104.26.10.229
AAAA Record:
These records correspond to AAAA which resolve to IPv6 addresses, for example, 2606:4700:20::681a:be5
CNAME Record:
These records correspond to CNAME which resolve to another domain name. For instance, in the online shop of the medium there is the sub domain store.medium.com which returns CNAME record shops.shopify.com. Then it is apparent that another DNS will have to be made to shops.shopify.com, to be able to get the IP.
MX Record:
These records correspond to MX whose address can be resolved into one of the servers that provide email services to the domain being enquired about. For example, an MX record response for medium.com looks something like this — alt1.aspmx.l.google.com. These records come with priority flags. This provides an ordering to the client on how to try out the servers and is good because when the main server goes down mail that has contacts in its memory to be sent is redirected to a backup server.
TXT records:
TXT records are placed for free text and any text of this kind can be written in. TXT records have a number of applications, but some of these may be to list domains that are authorized to send emails from that domain- in knowing the domain’s policy this helps to curtail spam and fake emails. They can be used to prove that you own that domain name when you register for services that require such domain.
Making A Request :
What happens when you make DNS request :
1. When you ask for a domain name, your computer will first search its own memory cache to see if it knows the address already from looking up that site at some point in recent (or distant) past; otherwise, we connect to our Recursive DNS Server
2.There are Your ISP provides usually a Recursive DNS Server, but you can also have your own. This server also maintains a local cache of domain names that have been recently looked up. In that case, if a local hit is detected again the result will be returned to you and your request ends here (a very common scenario for many of online popular highly requested services such as Google, Facebook or even Twitter!). if the request is not just sitting there waiting for a response, starts its journey to get an answer — starting with root DNS servers of the internet.
3. Root servers are the DNS backbone of the internet, they direct you to a specific Top Level Domain Server based on your query. For example, if you request [www. medium. If a user want to access this website [e.g. com], the root server will understand TLD as “. com, and take you to the right TLD server that deals with. com addresses.
4. The TLD Server − it contains the record of where to dig in order to locate an authoritative server for a specific DNS request. This authoritative server frequently called the nameserver for this domain. E.g name server for the [medium. com] is [kip. ns. cloudflare. com] and [uma. ns. cloudflare. com]. You will usually come across more than one nameserver for a particular domain, to provide failover in case of down time at any server.
5. An authoritative DNS server is basically the server where your records for your (zone) typically a domain name or subdomain are stored and updated. The DNS record (based on the type of record) is then sent back to the Recursive DNS Server — it will cache a local copy for subsequent requesting queries, and return that data to its original client sender. Every DNS record has a Time To Live (TTL) value This value is the response which can be cached locally, instead of having to go looking for it every time. It will a number in terms of seconds. Caching lessens the need for a DNS query when interacting with servers.