Showing posts with label Networking. Show all posts
Showing posts with label Networking. Show all posts

Wednesday, September 23, 2026

What Is an IP Address?

// networking

What Is an IP Address?

An IP address is a numerical address used to identify and communicate with devices and services across an IP network, including the internet.

// definition

IP stands for Internet Protocol

An IP address is an address assigned to a network interface using the Internet Protocol. It allows data to be addressed and routed between devices across networks.

// basic idea

Think of it as a network address

When data travels across a network, computers need to know where it should be sent.

Your device | v Network | v IP address | v Destination device or server

The Internet Protocol uses IP addresses as part of this addressing and routing process.

// IPv4

What does an IPv4 address look like?

One common type of IP address is an IPv4 address.

It is written as four decimal numbers separated by dots.

192.168.1.25

Each section represents 8 bits and can range from 0 to 255.

192 . 168 . 1 . 25 | | | | 8 bits 8 bits 8 bits 8 bits

IPv4 addresses are therefore 32 bits long.

4 x 8 bits = 32 bits
// address space

How many IPv4 addresses are possible?

A 32-bit address provides:

2^32 = 4,294,967,296

That is approximately 4.3 billion possible IPv4 addresses.

Not all of those addresses are available as ordinary public internet addresses because portions of the address space are reserved for particular purposes.

// IPv6

What is IPv6?

The newer version of Internet Protocol addressing is IPv6.

IPv6 addresses are 128 bits long and are normally written in hexadecimal.

2001:0db8:85a3:0000:0000:8a2e:0370:7334

IPv6 provides a vastly larger address space than IPv4.

IPv4 = 32 bits IPv6 = 128 bits
// comparison

IPv4 vs IPv6

IPv4

32-bit addresses written using four decimal numbers separated by dots.

IPv6

128-bit addresses normally written using hexadecimal groups separated by colons.

// public IP

What is a public IP address?

A public IP address is an address used for communication across the public internet.

For example, a home router may have a public IP address assigned by an internet service provider.

Internet | v Public IP address | v Router | v Local network

Public IP addresses must be globally routable and cannot simply be duplicated arbitrarily across the public internet.

// private IP

What is a private IP address?

Devices inside homes and businesses commonly use private IP addresses.

Common IPv4 private address ranges include:

10.0.0.0 - 10.255.255.255 172.16.0.0 - 172.31.255.255 192.168.0.0 - 192.168.255.255

These addresses can be reused on different private networks because they are not routed directly across the public internet.

// NAT

How can many devices share one public IP address?

Home and business networks commonly use Network Address Translation, or NAT.

Laptop 192.168.1.10 Phone 192.168.1.11 TV 192.168.1.12 | v Router | v One public IP address | v Internet

NAT allows multiple devices using private addresses to communicate through a smaller number of public IP addresses.

// assignment

Static vs dynamic IP addresses

Static IP

An address intended to remain fixed unless it is deliberately changed.

Dynamic IP

An address that may be assigned automatically and can change over time.

Internet service providers often assign dynamic public IP addresses to residential customers, while servers and business services may use static addressing where a stable address is useful.

// DHCP

How do devices get an IP address?

On many local networks, IP addresses are assigned automatically using:

DHCP Dynamic Host Configuration Protocol

A DHCP server can provide devices with information such as an IP address, subnet configuration, default gateway and DNS servers.

// DNS

IP addresses and domain names

Humans generally prefer names such as:

example.com

Computers communicating over IP networks ultimately use network addresses.

DNS helps connect these ideas.

Domain name | v DNS | v IP address | v Server

For example, an A record can map a hostname to an IPv4 address, while an AAAA record can map a hostname to an IPv6 address.

// URL

An IP address is not a URL

Consider:

https://example.com/products/item

This is a URL.

The hostname:

example.com

can be resolved through DNS to an IP address.

The rest of the URL identifies the protocol and the resource being requested.

// routing

How IP addresses help route data

Data sent using Internet Protocol is divided into packets.

IP packets contain addressing information including source and destination IP addresses.

Source IP | v Packet | v Routers | v Destination IP

Routers examine network information and decide where packets should be forwarded next.

// subnet

What is a subnet?

IP networks can be divided into smaller networks called subnets.

You may see notation such as:

192.168.1.0/24

The /24 is CIDR notation. It indicates that the first 24 bits describe the network portion of the IPv4 address.

192.168.1.0/24 Network portion = first 24 bits Host portion = remaining 8 bits
// special addresses

What is 127.0.0.1?

The IPv4 address:

127.0.0.1

is a loopback address commonly associated with:

localhost

It refers back to the local computer rather than another device on the internet.

Developers often use localhost when testing applications on their own machine.

// web servers

Does every website have its own IP address?

Not necessarily.

Multiple websites can share the same server and the same public IP address.

Website A Website B Website C | v Shared web server | v 203.0.113.10

Modern web servers can determine which website is being requested from information such as the hostname supplied by the browser.

// location

Can an IP address reveal your exact location?

An IP address can sometimes provide approximate geographic information, such as a country, region or general area.

However, an IP address does not inherently contain a person's exact home address or precise physical location.

Important: IP geolocation databases are estimates. Their results can be inaccurate, and networks such as mobile networks, VPNs and corporate systems can make the apparent location very different from the user's actual location.
// changing addresses

Can your IP address change?

Yes.

A device may receive a different IP address when:

Network changes

Connecting to a different Wi-Fi or mobile network can give the device different addressing.

DHCP changes

A dynamically assigned address can change when its network lease changes.

ISP changes

An internet provider may assign a different public address over time.

VPN usage

Internet services may see the VPN server's public IP address rather than the user's ordinary public IP.

// mental model

The easiest way to remember it

Domain name = human-readable name DNS = translates names into network information IP address = network address Router = forwards packets between networks Server = provides a service URL = identifies a specific web resource

The IP address is therefore one of the fundamental pieces of information used to move data from one network location to another.

// summary

An IP address identifies a network destination.

An IP address is an address used by the Internet Protocol to identify network interfaces and route data. IPv4 uses 32-bit addresses, while IPv6 uses 128-bit addresses. Devices may use public or private addresses, and DNS helps connect human-readable domain names to IP addresses.

What Is a Nameserver?

// DNS

What Is a Nameserver?

A nameserver is part of the Domain Name System. It helps computers discover the DNS records associated with a domain name.

// definition

A nameserver is a DNS server

A nameserver is a server that responds to DNS queries. When talking about domains, the term usually means an authoritative nameserver: a server responsible for providing the official DNS records for a particular DNS zone.

// basic idea

What does a nameserver actually do?

Imagine someone enters:

www.example.com

A computer needs to find out where that hostname should lead.

DNS eventually reaches the nameservers responsible for example.com and asks them for the relevant DNS information.

Domain name | v DNS lookup | v Authoritative nameserver | v DNS record | v Destination
// example

What does a nameserver look like?

A domain may use nameservers such as:

ns1.example-dns.com ns2.example-dns.com

These are hostnames identifying DNS servers.

It is common for a domain to use more than one nameserver so DNS can continue working if one server becomes unavailable.

// records

Nameservers provide DNS records

The nameserver does not normally contain the website itself. Instead, it provides information describing how the domain should behave.

A
Maps a hostname to an IPv4 address.
AAAA
Maps a hostname to an IPv6 address.
CNAME
Makes one hostname an alias of another hostname.
MX
Identifies the mail servers used to receive email.
TXT
Stores text used for verification, security policies and other purposes.
NS
Identifies the nameservers responsible for a DNS zone.
// authoritative

What is an authoritative nameserver?

An authoritative nameserver is considered an official source of DNS information for the DNS zones it serves.

example.com | v Authoritative nameserver | +-- A record +-- CNAME record +-- MX record +-- TXT record

If another DNS server asks for information about example.com, the authoritative nameserver can provide the records configured for that zone.

// NS records

How does DNS know which nameservers to use?

DNS uses NS records.

NS stands for:

Name Server

A simplified configuration might look like:

example.com NS ns1.example-dns.com NS ns2.example-dns.com

These records identify the nameservers responsible for that DNS zone.

// hierarchy

Nameservers are part of the DNS hierarchy

DNS is organised as a hierarchy rather than one enormous central database.

For example:

DNS root | v .com | v example.com | v www.example.com

Each level can help direct DNS queries towards the servers responsible for the next level.

// delegation

What is DNS delegation?

Delegation means assigning responsibility for a DNS zone to particular authoritative nameservers.

For example, the DNS infrastructure responsible for the .com top-level domain can indicate which nameservers are responsible for example.com.

.com | v "Ask these nameservers about example.com" | v ns1.example-dns.com ns2.example-dns.com
// registrar

Where do you set nameservers?

For a registered domain, nameserver settings are commonly managed through the company acting as the domain registrar.

Domain registrar | v Nameserver settings | v DNS provider | v DNS records

You might therefore register your domain with one company while using another company to provide its DNS.

// distinction

Domain registrar, nameserver and web host are different

Domain registrar

Manages the registration of your domain name.

Nameserver

Answers DNS queries and provides DNS records for zones it is authoritative for.

DNS provider

Operates the DNS infrastructure where you manage your records.

Web host

Runs or stores the website or application reached through the domain.

// changing nameservers

What happens when you change nameservers?

Changing a domain's nameservers changes which DNS servers are authoritative for that domain.

Before: Domain | v Old nameservers | v Old DNS records After: Domain | v New nameservers | v New DNS records
Important: changing nameservers is different from changing an individual DNS record. A nameserver change can move responsibility for the entire DNS zone to another provider.
// records vs nameservers

Changing a DNS record vs changing nameservers

Change a DNS record

Keep the existing DNS provider but modify something such as an A, CNAME, MX or TXT record.

Change nameservers

Change the DNS servers responsible for providing the authoritative records for the domain.

// resolver

Nameserver vs DNS resolver

Another important distinction is between a recursive resolver and an authoritative nameserver.

Recursive resolver

Searches for DNS information on behalf of the user and may cache the result.

Authoritative nameserver

Supplies the authoritative DNS records for the zones for which it is responsible.

Browser | v Recursive DNS resolver | v Authoritative nameserver | v DNS answer
// redundancy

Why do domains normally have multiple nameservers?

Domains usually have at least two authoritative nameservers.

ns1.example-dns.com ns2.example-dns.com

This improves resilience. If one nameserver cannot answer a query, another may still be available.

// caching

Why can nameserver changes take time?

DNS information is cached.

After changing nameservers, some DNS resolvers may still temporarily remember older information.

Nameserver change | v Some DNS caches still contain old information | v Cache expires | v Current information is requested

This is part of what people commonly refer to as DNS propagation.

// glue

What are glue records?

Consider this configuration:

Domain: example.com Nameserver: ns1.example.com

DNS needs to locate ns1.example.com before it can ask that nameserver about example.com.

This can create a circular dependency.

A parent DNS zone can therefore provide IP-address information for the nameserver. This information is commonly called glue.

// subdomains

Subdomains can use different nameservers

DNS delegation does not have to stop at the main registered domain.

A subdomain can be delegated to another set of nameservers.

example.com | v Nameservers A api.example.com | v Nameservers B

This can be useful when different systems or teams manage different parts of a domain.

// mental model

The easiest way to remember it

Domain = the name Nameserver = where authoritative DNS answers come from DNS records = the instructions IP address = a network destination Hosting = where the website or service runs

A nameserver therefore does not usually store your website. Its job is to provide the DNS information needed to locate the services associated with your domain.

// summary

Nameservers provide the DNS answers.

A nameserver is a DNS server. In domain management, the term usually refers to an authoritative nameserver that provides the official DNS records for a domain or DNS zone. NS records identify nameservers, while DNS delegation tells the wider DNS system which nameservers are responsible for answering questions about a zone.

What Is DNS?

// networking

What Is DNS?

DNS is the system that connects human-readable domain names to the servers and services behind them. Without DNS, using the web would usually require remembering numerical network addresses instead of names such as freelancecoder.uk.

// definition

DNS means Domain Name System

DNS, or the Domain Name System, is a distributed system used to translate domain names into information that computers can use to locate internet services.

// basic idea

Domain name to server

People prefer names. Computers ultimately need network addresses and routing information.

Domain name | v DNS lookup | v IP address or another DNS destination | v Server | v Website or service

When you enter a domain into a browser, DNS helps determine where the request should be sent.

// example

A simple DNS lookup

Imagine that a browser needs to open:

www.example.com

The browser needs to determine which server or service is responsible for that hostname.

www.example.com | v DNS | v Destination | v Web server

Once the destination has been found, the browser can begin communicating with the appropriate server.

// distinction

Domain, DNS and hosting are different

Domain

The human-readable name, such as example.com.

DNS

The system that tells computers where services associated with that name can be found.

Hosting

The server or platform that stores and serves the website or application.

Website

The actual pages, files and application content that visitors interact with.

Domain | v DNS | v Hosting | v Website
// records

Common DNS record types

DNS stores different kinds of information in DNS records.

A
Maps a hostname to an IPv4 address.
AAAA
Maps a hostname to an IPv6 address.
CNAME
Makes one hostname an alias of another hostname.
MX
Identifies the mail servers responsible for receiving email for a domain.
TXT
Stores text information. TXT records are commonly used for domain verification and email-related policies.
NS
Identifies the authoritative nameservers responsible for a DNS zone.
// A record

Pointing a domain to an IPv4 address

An A record maps a hostname directly to an IPv4 address.

example.com | v A record | v 203.0.113.10

The exact IP address will depend on the server or hosting platform being used.

// CNAME

Pointing one hostname to another

A CNAME record creates an alias between hostnames.

www.example.com | v CNAME | v hosting.example.net

The DNS system can then continue resolving the destination hostname.

Important: a CNAME points to another hostname, not directly to an IP address.
// email

DNS also controls email routing

DNS is not only used for websites.

MX records tell other mail systems which servers should receive email for a domain.

person@example.com | v DNS MX lookup | v Mail server | v Mailbox system

This is why changing website hosting does not necessarily mean changing email hosting.

// nameservers

What are nameservers?

Nameservers are DNS servers responsible for providing information about domains and DNS zones.

A domain registrar may allow you to select which nameservers are authoritative for your domain.

Domain | v NS records | v Authoritative nameservers | v DNS records

Those authoritative servers contain or serve the DNS records that describe where the domain's services should go.

// hierarchy

DNS is hierarchical

Domain names are organised into levels.

www.example.com www = hostname / subdomain example = registered domain label com = top-level domain

At the very top of DNS is the DNS root.

DNS root | v .com | v example.com | v www.example.com
Terminology: people sometimes informally call example.com the "root domain", but in DNS terminology the actual DNS root is the top of the global DNS hierarchy.
// resolution

How DNS resolution works

A DNS lookup can involve several different systems.

Browser | v DNS resolver | v DNS hierarchy | v Authoritative nameserver | v DNS answer | v Browser

A recursive resolver performs or coordinates the lookup required to obtain the answer for the client.

// caching

DNS answers can be cached

DNS systems often cache previous answers so that every lookup does not have to repeat the full resolution process.

This improves speed and reduces unnecessary DNS traffic.

// TTL

What is TTL?

DNS records commonly include a value called TTL, meaning Time To Live.

TTL tells DNS caches approximately how long a record may be retained before it should be refreshed.

TTL = 3600 3600 seconds = 1 hour

A DNS change may therefore not appear everywhere immediately because some systems may still have an older answer cached.

// propagation

What does DNS propagation mean?

When people say that DNS is propagating, they usually mean that different DNS resolvers and caches are gradually replacing previously cached information with newer records.

Old DNS record | v DNS record changed | v Some caches still contain old answer | v Caches expire and refresh | v New answer becomes widely visible

The term "propagation" is convenient, although much of the delay is actually caused by caching and TTL behaviour.

// URL

DNS does not resolve an entire URL

Consider:

https://www.example.com/articles/dns

DNS is primarily concerned with the hostname:

www.example.com

The rest of the URL is handled by the web request and the server or application.

// IP

DNS and IP addresses

DNS and IP addresses solve different parts of the problem.

Concept Purpose
Domain name Human-readable name.
DNS Resolves names and provides service information.
IP address Network address used for routing traffic.
Server Handles requests and provides a service.
// practical

When would you edit DNS?

You may need to change DNS records when:

Connecting a website

Pointing a domain to Blogger, WordPress, a hosting company or another web platform.

Configuring email

Adding MX and other email-related records.

Verifying ownership

Adding a TXT or CNAME record to prove control of a domain.

Creating subdomains

Connecting names such as blog.example.com or api.example.com to services.

// mental model

A useful way to remember DNS

Domain = name DNS = directions IP address = network address Hosting = where the service runs Website = what the visitor sees

DNS acts as the connection between the name people type and the internet service that should receive the request.

// summary

Names need directions.

DNS stands for Domain Name System. It connects domain names with the servers and services behind them using records such as A, AAAA, CNAME, MX, TXT and NS. DNS is separate from the domain itself, the hosting platform and the website content, but it is the system that connects those pieces together.

Monday, September 21, 2026

What Is a Web Domain?

// internet

What Is a Web Domain?

A web domain is the human-readable name used to identify a location on the internet. Instead of remembering a numerical IP address, people can enter a name such as freelancecoder.uk into a browser.

// definition

A domain is an internet name

A domain name is a name registered within the Domain Name System, or DNS.

It gives people and software a memorable way to refer to websites, servers, email services and other internet resources.

For example:

freelancecoder.uk
// why domains exist

Computers and humans identify things differently

Internet systems communicate using numerical network addresses such as IP addresses.

Humans generally find names easier to remember.

Human-friendly: freelancecoder.uk Machine address: 216.239.32.21

DNS provides the system that connects domain names to the technical resources behind them.

// dns

DNS connects domain names to internet services

DNS stands for Domain Name System.

When someone enters a domain into a browser, DNS can be used to determine where that request should be sent.

freelancecoder.uk ↓ DNS ↓ IP address or another hostname ↓ Web server ↓ Website
// structure

A domain has different parts

Consider:

freelancecoder.uk

freelancecoder

The registered name chosen for the domain.

.uk

The top-level domain at the end of the name.

// top-level domain

What is a TLD?

TLD stands for Top-Level Domain.

It is the final part of a domain name.

.com .uk .org .net .dev .io .info .xyz
// country domains

Some TLDs represent countries

Country-code top-level domains are known as ccTLDs.

TLD Country or territory
.uk United Kingdom
.pt Portugal
.fr France
.de Germany
.es Spain
// subdomains

A domain can have subdomains

Consider:

www.freelancecoder.uk

Here:

www ↓ subdomain freelancecoder.uk ↓ registered domain

Other examples could include:

blog.example.com shop.example.com api.example.com docs.example.com

Different subdomains can point to different services.

// root domain

What is the root or apex domain?

The domain without a subdomain is often called the apex domain or root domain.

freelancecoder.uk

By comparison:

www.freelancecoder.uk

contains the www subdomain.

// domain vs url

A domain is not the same as a URL

A domain might be:

freelancecoder.uk

A complete URL might be:

https://www.freelancecoder.uk/contact

The URL contains additional information.

Part Example
Protocol https://
Hostname www.freelancecoder.uk
Domain freelancecoder.uk
Path /contact
// domain vs website

A domain is not the website itself

This is an important distinction.

Domain → the internet name Website → the pages, files and application Hosting → the infrastructure that serves the website

You can own a domain without having a website attached to it.

You can also move a website to another hosting provider while keeping the same domain name.

// registrar

Domains are registered through registrars

A domain registrar is a company authorised to register domain names for customers.

When a domain is available, you can register the right to use it for a particular registration period.

Choose domain ↓ Registrar ↓ Register domain ↓ Configure DNS ↓ Connect services
// registry

Registrars and registries are different

The registrar is normally the company through which the customer manages the registration.

The registry operates the database and infrastructure for a particular top-level domain.

Registrant ↓ Registrar ↓ Registry ↓ Domain Name System
// nameservers

Nameservers tell the internet where DNS records live

A domain is normally assigned authoritative nameservers.

These servers provide DNS information for the domain.

Domain ↓ Nameservers ↓ DNS records ↓ Website / Email / Other services

Changing nameservers can effectively move responsibility for managing the domain's DNS records to another provider.

// dns records

DNS records control where services point

Record Common purpose
A Points a name to an IPv4 address
AAAA Points a name to an IPv6 address
CNAME Aliases one hostname to another
MX Directs email delivery
TXT Stores text used for verification and policies
NS Identifies authoritative nameservers
// a record

An A record can point a domain to a server

freelancecoder.uk ↓ A record ↓ 216.239.32.21

An A record maps a hostname to an IPv4 address.

// cname

A CNAME can point one name to another

www.freelancecoder.uk ↓ CNAME ↓ ghs.google.com

This allows the www hostname to reference another hostname instead of directly containing an IP address.

// email

Domains can also be used for email

A domain is not limited to websites.

The same domain could also support addresses such as:

hello@example.com support@example.com accounts@example.com

DNS records can direct email traffic to a mail provider independently of where the website is hosted.

// https

A domain can be protected with HTTPS

HTTPS encrypts communication between a browser and a website.

http://example.com ↓ https://example.com

HTTPS normally uses a digital certificate associated with the domain or hostname.

The domain and the SSL/TLS certificate are separate things. Registering a domain does not itself create the website, although many hosting platforms automatically provide HTTPS certificates after the domain is connected.

// dns changes

DNS changes may not appear everywhere immediately

DNS information is cached by resolvers and other systems.

When a record changes, some systems may continue using the older cached information until it expires.

Old DNS record ↓ Record changed ↓ Caches expire ↓ New record becomes widely visible

This process is commonly described as DNS propagation.

// ttl

DNS records have a TTL

TTL means Time To Live.

It tells DNS resolvers approximately how long a record may be cached before it should be refreshed.

TTL: 3600 3600 seconds = 1 hour
// registration

Domain registrations must normally be renewed

A domain is generally registered for a defined period.

To continue controlling the domain, the registration normally needs to be renewed before it ultimately expires.

Register ↓ Use domain ↓ Renew ↓ Continue using domain
// ownership

"Buying" a domain is really a registration right

People often say they have bought a domain.

More precisely, they have registered the right to use that domain according to the rules of the relevant registry and registrar for as long as the registration remains valid.

// transfers

Domains can usually be transferred

A domain can often be moved from one registrar to another without changing the domain name itself.

Registrar A ↓ Domain transfer ↓ Registrar B

The website can remain on the same hosting platform if the DNS configuration continues pointing to the same destination.

// one domain

One domain can connect many services

example.com │ ├── www.example.com │ → website │ ├── api.example.com │ → API │ ├── shop.example.com │ → online store │ └── email@example.com → email service

DNS makes it possible for these services to be hosted in completely different places while sharing the same domain.

// domain + hosting

The domain and hosting can come from different companies

You do not normally have to register a domain with the same company that hosts the website.

Domain registrar ↓ DNS ↓ Website host

This separation is one of the most useful features of the Domain Name System.

// mental model

A simple way to think about domains

Domain

The memorable internet name.

DNS

The system that tells software where services are.

Hosting

The infrastructure that stores or runs the website.

HTTPS

The secure encrypted connection used to reach it.

// summary

A human-readable internet address.

A web domain is a registered name used to identify internet resources. DNS connects that name to websites, servers, email systems and other services. The domain, DNS, hosting and website are separate components that work together to make an internet service accessible.

What Is an IP Address?

// networking What Is an IP Address? An IP address is a numerical address used t...