When try to reach "athome.tld", your device ask a DNS resolver what IP is behind. DNS is like road signs.
To create this sign, you must link the domain name to your IP in a zone. It can be done in registrar panel if you don't host your own domain name server (see nsd later 😉). As example :
athome.tld A 192.0.2.2
Different records exists. You must at least know:
- A : point to an IPv4.
- AAAA : point to and IPv6.
- MX, NS, TXT... used for mail servers and domain name servers.
- CNAME. Sort of aliases, pointing to an A record. Useful to set subdomains :
blog.athome.tld CNAME athome.tld wiki.athome.tld CNAME athome.tld webmail.athome.tld CNAME athome.tld
Learn more with these links :https://en.wikipedia.org/wiki/Domain_Name_System
Learn how to host a domain name server.