Domain Name Server (DNS) is the Internet-wide “phone book” that tells the browser how to resolve a human-readable name
like k7a.io or google.com to a specific IP address of a server that it can then connect to.
Bare domains and subdomains
A bare domain is a domain that does not contain a subdomain, such as https://example.com –
notice that there is no prefix like www. or app. present before example.com.
Bare domains are also known as: apex, base, naked, root, root apex, or zone apex domains.
In DNS provider configuration bare domains are usually symbolized by an @ symbol.
A Subdomain is a part of a domain name that comes before the bare domain name.
For example, in https://app.example.com url, app is a subdomain.
In most situations it is recommended to move your website off the bare domain so that it uses a prefix (e.g. www subdomain).
That approach provides some advantages like better manageability of DNS configuration or improved security.
Example: on this website, k7a.io is a bare domain, whereas www part in www.k7a.io is a subdomain.
A permanent redirect (subdomain forward) on DNS provider level is set up so that it redirects from k7a.io
bare domain to www subdomain: k7a.io -> https://k7a.io.
DNS record types
List of some of the most common or useful DNS record types.
A– Apex or root record. It maps a hostname to an IPv4 address of a server. All traffic in a domain will be redirected to the specified IP address.AAAA– Similar toAbut maps to IPv6 address instead. It is a more modern protocol.ALIAS– This record type is not a part of a standard, so it is not supported by all DNS providers (e.g. Google Domains at the time of writing this post). It is a virtual record type to provide CNAME-like behaviour on bare (apex) domains e.g. point from a bare domain to a subdomain.CNAME– Canonical name record used to specify an alias. It maps one human-readable hostname to another one that the browser should look up instead. According to the DNS specification, any domain name that has aCNAMErecord set cannot have any other DNS records associated with it.On this website I would use
CNAME k7a.io -> k7a-io.netlify.app(if deployed on Netlify).MX– Mail server address. Can be used to route email traffic on your domain to another, external server. There can only be oneMXrecord for one domain.TXT– Allows to include any text in the domain record. Can be used to implement the Sender Policy Framework (SPF) specification. This record is often used to verify domain ownership in Google applications.
References
- Cloudflare – DNS records
- Home.pl – What are domain records?
- Netlify – How to Set Up Netlify DNS – Custom Domains, CNAME, & A Records
- Why use www? | www. is not deprecated
This entry is a part of my Today I Learned (TIL) series, in which I take and share short notes on what I have recently learned.