Core question: Why do we type words like
google.cominstead of long strings of numbers, and how is a domain name structured?
To send a request to a server, your computer needs to know that server's exact location on the internet. Computers identify each other using numerical labels called IP Addresses—strings of numbers like 142.250.190.46 (or even longer strings like 2607:f8b0:4004:800::200e).
While computers love numbers, humans are terrible at memorizing them. Imagine if you had to type 142.250.190.46 to search on Google, 157.240.229.35 to check Instagram, and dozens of other number combinations every day.
To solve this, the internet uses Domain Names (like google.com or wikipedia.org). A domain name is simply a human-friendly, memorable nickname that maps to a server's numerical IP address—just like saving a friend's name in your phone's contacts list so you never have to memorize their 11-digit phone number.
In English, we read from left to right, so when you look at mail.google.com, your eyes start at mail. However, computers and networking systems read domain names from right to left, moving from the broadest category down to the most specific server.
Let's dissect mail.google.com from right to left:
.comThe segment at the far right (after the final dot) is the Top-Level Domain (TLD). It represents the highest category in the domain hierarchy. There are two main types of TLDs:
.com (commercial), .org (non-profit organization), .edu (education), .gov (government). Today, there are hundreds of modern gTLDs popular with tech companies, such as .dev, .app, .ai, and .xyz..ng (Nigeria), .uk (United Kingdom), .de (Germany), or .jp (Japan). (Fun fact: Tech startups love .io and .ai because they stand for "Input/Output" and "Artificial Intelligence," but they are actually country-code TLDs for the British Indian Ocean Territory and Anguilla!)googleMoving one step to the left of the TLD is the Second-Level Domain. This is the unique brand, project, or company name you register (like google, netflix, or github).
When you combine the Second-Level Domain and the Top-Level Domain together (google.com), engineers call it the Root Domain (or Apex Domain).
mail.Everything to the left of the root domain is an optional Subdomain. Once you own a root domain like google.com, you can create an unlimited number of subdomains for free to organize different parts or servers of your application:
mail.google.com (Email application)docs.google.com (Document editor)calendar.google.com (Calendar application)