localhost
"Localhost" refers to the computer you're currently working on. It's essentially a loopback address that points to the machine itself, allowing it to communicate with itself over a network. In technical terms, the IP address for localhost is usually 127.0.0.1
for IPv4, or ::1
for IPv6.

ping command
ping localhost
ping google.com
Notice google points to a different IP address
.
IP (Internet Protocol) Address:
- An IP address is a unique string of numbers that identifies a device on a network, like the internet. Think of it like a house address: it's how computers (or any devices on the network) know where to send information.
- For example,
192.168.1.1
is an IP address.
- An IP address is essential for routing data on the internet, but it's not the most human-friendly system.
Domain name
- A domain name is the readable, human-friendly address we use to access websites, like
google.com
or example.org
.
- Domains are a higher-level abstraction that makes it easier for us to remember websites instead of trying to recall a string of numbers (like an IP address).
- For instance, when you type
www.google.com
into your browser, your computer looks up that domain name and finds the corresponding IP address, then connects to the website.
Domain name vs Phone number

Limited IP addresses