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 Python?

// programming

What Is Python?

Python is a high-level, general-purpose programming language known for readable syntax and a large ecosystem of libraries. It is widely used for automation, data processing, web development, artificial intelligence, APIs and many other programming tasks.

// definition

Python is a programming language

Python is a general-purpose programming language used to express instructions that computers can execute.

It is designed around relatively clear and concise syntax, allowing many programs to be expressed with comparatively little code.

Python can be used for small scripts as well as much larger software systems.

// hello world

A Python program can be extremely simple

print("Hello, world!")

The print() function sends the text to the program's output.

Hello, world!
// files

Python source files normally use .py

hello.py automation.py data_cleaner.py api_client.py

These files contain Python source code written as plain text.

// variables

Python can store values in variables

name = "Freelance Coder" price = 25.50 quantity = 4 active = True

The variable name provides a way for later instructions to refer to the stored object.

// data types

Python has many built-in data types

Type Example
str "Hello"
int 42
float 3.14
bool True
list [1, 2, 3]
dict {"name": "Tiago"}
tuple (1, 2)
set {1, 2, 3}
NoneType None
// dynamic typing

Python is dynamically typed

A variable name does not have to be declared with a fixed type before it is used.

x = 10 x = "hello"

In this example, the name x first refers to an integer and later refers to a string.

The objects still have types. Dynamic typing means Python determines and checks those types at runtime rather than requiring every variable declaration to specify one in advance.

// operators

Python can perform calculations

a = 10 b = 3 a + b a - b a * b a / b a ** b a % b

These operators perform addition, subtraction, multiplication, division, exponentiation and remainder operations.

// lists

Lists store ordered collections

languages = [ "Python", "JavaScript", "PHP" ]

Python list indexes begin at zero.

languages[0] # "Python"
// dictionaries

Dictionaries store key-value relationships

product = { "name": "Keyboard", "price": 39.99, "stock": 12 }

Individual values can be retrieved using their keys.

product["price"] # 39.99
// conditions

Python can make decisions

age = 20 if age >= 18: print("Adult") else: print("Under 18")

The program follows different instructions depending on whether the condition is true or false.

// indentation

Indentation is part of Python syntax

Many programming languages use braces to group blocks of instructions.

Python uses indentation.

if temperature > 20: print("Warm") print("Open the window") print("Finished")

The two indented instructions belong to the if block.

Whitespace can therefore affect program meaning. Indentation is not merely visual formatting in Python.

// loops

Loops repeat instructions

for number in [1, 2, 3]: print(number)

Output:

1 2 3
// range

range() is useful for repeated operations

for i in range(5): print(i)

This produces:

0 1 2 3 4
// functions

Functions package reusable behaviour

def add(a, b): return a + b result = add(5, 7) print(result)

Output:

12

Functions help divide larger programs into smaller, reusable pieces.

// classes

Python supports object-oriented programming

class Product: def __init__(self, name, price): self.name = name self.price = price product = Product( "Keyboard", 39.99 )

Classes can define objects that combine data and behaviour.

// modules

Programs can be divided into modules

Python code stored in separate files can be imported and reused.

import math result = math.sqrt(25) print(result)

Output:

5.0
// standard library

Python includes a large standard library

A Python installation includes modules for many common programming tasks.

Files JSON CSV SQLite Dates Regular Expressions Networking ZIP Files
// packages

Additional libraries can be installed

Python has a very large ecosystem of third-party packages.

Packages are commonly installed using pip.

pip install requests

The package can then be imported into a Python program.

import requests
// environments

Projects can use virtual environments

Different projects may depend on different package versions.

A virtual environment creates an isolated Python environment for a project.

python -m venv .venv
Project A ↓ Environment A ↓ Its packages Project B ↓ Environment B ↓ Different packages
// file handling

Python can read and write files

with open( "example.txt", "r", encoding="utf-8" ) as file: text = file.read() print(text)

This makes Python useful for processing large numbers of files automatically.

// csv

Python can process CSV data

import csv with open( "customers.csv", encoding="utf-8", newline="" ) as file: rows = csv.reader(file) for row in rows: print(row)

CSV processing is useful for spreadsheets, exports, reports and data cleaning.

// json

Python works naturally with JSON

import json text = '{"name": "Alice", "active": true}' data = json.loads(text) print(data["name"])

Output:

Alice
// databases

Python can communicate with databases

Python's standard library includes support for SQLite, and third-party packages can connect to many other database systems.

Python ↓ SQL ↓ Database ↓ Rows of data
SQLite PostgreSQL MySQL SQL Server
// sqlite example

Python can create a SQLite database

import sqlite3 connection = sqlite3.connect( "products.db" ) cursor = connection.cursor() cursor.execute(""" CREATE TABLE IF NOT EXISTS products ( id INTEGER PRIMARY KEY, name TEXT, price REAL ) """) connection.commit() connection.close()
// apis

Python can communicate with APIs

A Python application can send HTTP requests and process the returned information.

Python program ↓ HTTP request ↓ API ↓ JSON response ↓ Python data

A third-party library such as requests is commonly used for this.

import requests response = requests.get( "https://api.example.com/products" ) data = response.json()
// automation

Python is particularly useful for automation

A Python script can perform repetitive technical tasks without someone manually completing each step.

Read files ↓ Clean data ↓ Call API ↓ Update database ↓ Create spreadsheet ↓ Generate report
// spreadsheets

Python can work with Excel files

Libraries such as openpyxl can read, create and modify .xlsx workbooks.

from openpyxl import Workbook workbook = Workbook() sheet = workbook.active sheet["A1"] = "Product" sheet["B1"] = "Price" workbook.save( "products.xlsx" )

This can automate spreadsheet reporting and data processing.

// data

Python is widely used for data work

Data Cleaning Data Analysis Statistics Visualisation Spreadsheets Databases

Libraries such as NumPy and pandas provide additional tools for numerical and tabular data processing.

// artificial intelligence

Python is widely used in AI and machine learning

Many machine-learning and artificial-intelligence libraries provide Python interfaces.

Machine Learning Neural Networks Natural Language Processing Computer Vision

Python's role here is strengthened by its extensive scientific and data-processing ecosystem.

// web development

Python can run web applications

Python can execute on a server and generate website responses.

Browser ↓ HTTP request ↓ Python web application ↓ Database / APIs ↓ HTTP response ↓ Browser

Python web frameworks include technologies such as Django, Flask and FastAPI.

// python vs javascript

Python and JavaScript often run in different places

Python JavaScript
Commonly runs on servers or computers Runs directly in web browsers
Strong data and automation ecosystem Core language of browser interactivity
Can build back-end web services Can build front-end and back-end applications

Both languages are general-purpose enough to overlap in many areas.

// execution

How does Python code actually run?

The most widely used Python implementation is CPython.

In simplified form, CPython processes source code, compiles it into Python bytecode and executes that bytecode using its interpreter.

Python source code ↓ Compilation ↓ Python bytecode ↓ Python virtual machine ↓ Program executes

Calling Python simply "interpreted" is useful but incomplete. Python implementations can use different execution techniques. CPython normally compiles source code to bytecode before executing it.

// interactive shell

Python can also be used interactively

Python provides an interactive environment where instructions can be entered one at a time.

>>> 2 + 3 5 >>> "hello".upper() 'HELLO'

This makes it convenient for experimentation, calculations and testing small pieces of code.

// readability

Python emphasises readable syntax

Compare the structure of a simple condition:

if balance > 0: print("Positive balance")

Keywords such as if, for, in, def and return make much Python code relatively close to structured written instructions.

// uses

What is Python used for?

Automation

Repetitive computer tasks can be scripted.

Data

Files, spreadsheets and databases can be processed.

APIs

Programs can communicate with external services.

Web Development

Python can power server-side web applications.

AI

Python is widely used with machine-learning tools.

Scientific Computing

Numerical and scientific libraries support research and technical computing.

// practical example

One script can connect several technologies

CSV file ↓ Python ↓ Clean data ↓ SQLite database ↓ API request ↓ Create XLSX report ↓ ZIP output files

This ability to connect different formats, systems and services is one reason Python is particularly useful for automation and data-management work.

// mental model

The simplest way to think about Python

Data ↓ Python instructions ↓ Logic + calculations ↓ Files / APIs / databases ↓ Useful result

Python provides a language for describing the operations a computer should perform.

// summary

Instructions become automation.

Python is a high-level, general-purpose programming language with readable syntax and a large software ecosystem. It can work with files, spreadsheets, databases, APIs and websites, and is widely used for automation, data processing, scientific computing, artificial intelligence and software development.

What Is Affiliate Marketing?

// online business

What Is Affiliate Marketing?

Affiliate marketing is a form of performance-based marketing in which a person or business promotes another company's products or services and can receive a reward when their marketing generates a qualifying result.

// definition

Affiliate marketing connects promotion to results

Affiliate marketing is a marketing arrangement in which an affiliate promotes a merchant's products or services using trackable links, codes or other attribution methods.

If a visitor performs a qualifying action, such as making a purchase, the affiliate may receive a commission or other reward.

This makes affiliate marketing a form of performance-based marketing.

// participants

Who is involved?

Merchant

The business selling the product or service.

Affiliate

The person or publisher promoting the merchant.

Customer

The person who follows the promotion and may purchase the product.

Affiliate Network

An optional intermediary that tracks referrals, commissions and payments.

// process

How affiliate marketing works

Merchant ↓ Affiliate programme ↓ Affiliate receives tracking link ↓ Affiliate publishes useful content ↓ Visitor clicks affiliate link ↓ Visitor reaches merchant ↓ Qualifying action occurs ↓ Affiliate receives commission
// affiliate link

What is an affiliate link?

An affiliate link is a URL containing information that allows a merchant or affiliate platform to identify which affiliate generated a visit.

https://example.com/product?ref=affiliate123

In this simplified example:

affiliate123 ↓ identifies the affiliate

Real affiliate tracking systems can use more complex identifiers and URLs.

// tracking

The click can be attributed to the affiliate

Visitor ↓ Affiliate link ↓ Tracking system records referral ↓ Merchant website

If a qualifying conversion later occurs, the tracking system can attempt to connect that conversion with the affiliate who referred the visitor.

// cookies

Cookies are one method of affiliate tracking

Some affiliate programmes use cookies or similar technologies to remember that a visitor arrived through an affiliate.

Affiliate link clicked ↓ Tracking information stored ↓ Visitor returns later ↓ Purchase ↓ Referral may be attributed

The exact tracking method depends on the affiliate programme.

// attribution window

Affiliate programmes can have attribution windows

A programme may only credit an affiliate when a conversion occurs within a defined period after the referral.

Click ↓ Day 1 Purchase ↓ Day 10 Is commission awarded? → Depends on the programme's attribution rules

These periods are sometimes informally called cookie windows, although modern attribution systems are not necessarily based only on cookies.

// attribution

Who receives the commission?

Consider a customer who visits several websites:

Affiliate A ↓ Customer Affiliate B ↓ Customer Affiliate C ↓ Customer ↓ Purchase

Which affiliate receives credit depends on the programme's attribution model.

Some programmes may use last-click attribution. Others use different rules.

// conversion

What is a conversion?

A conversion is the action that the affiliate programme wants the visitor to complete.

Purchase Subscription Sign-up Lead App Installation Free Trial
// commissions

Affiliates can be rewarded in different ways

Model Affiliate reward
Pay per sale Customer completes a purchase
Pay per lead Customer becomes a qualifying lead
Pay per action User performs a specified action
Pay per click Payment may be based on qualifying clicks
// percentage commission

Commission can be a percentage of a sale

Suppose an affiliate programme pays a 10% commission.

Customer purchase = £100 Commission rate = 10% Affiliate commission = £10

The actual commission calculation depends on the programme's terms, including which products, fees, taxes, discounts or other amounts are commissionable.

// fixed commission

Commission can also be a fixed amount

Qualifying subscription ↓ £20 affiliate commission

This is common where each successful conversion has a predefined value.

// recurring commission

Some programmes offer recurring commissions

Subscription businesses may sometimes pay commission repeatedly while the referred customer remains an eligible paying customer.

Customer subscribes ↓ Month 1 commission Month 2 commission Month 3 commission ...

Other programmes pay only once for the initial sale.

// affiliate networks

What is an affiliate network?

An affiliate network can act as an intermediary between merchants and affiliates.

Merchant ↓ Affiliate network ↓ Affiliate ↓ Audience

A network may provide:

Tracking Affiliate Links Reporting Commission Data Payments Merchant Discovery
// direct programme

A company can run its own affiliate programme

An affiliate network is not always required.

Company ↓ Own affiliate programme ↓ Affiliate ↓ Customer

In this situation, the relationship can be managed directly between the merchant and affiliate.

// referral vs affiliate

Referral programmes and affiliate programmes are not identical

The terms are sometimes used loosely, but there can be an important distinction.

Referral Programme Affiliate Programme
Often designed for existing customers Often designed for publishers and marketers
Reward may be account credit Reward is often monetary commission
May reward both people Usually rewards the affiliate for conversions
Often encourages personal recommendations Often intended for ongoing marketing activity

Not every referral link is a traditional affiliate link. A programme might reward account credit, discounts, points or another benefit instead of cash commission.

// content

Affiliate links can appear in useful content

Tutorials Reviews Guides Comparisons Blog Posts Videos Newsletters Social Media
// contextual marketing

Educational content can create natural affiliate opportunities

Suppose a website publishes an article explaining web hosting.

What Is Web Hosting? ↓ Reader understands hosting ↓ Relevant hosting service mentioned ↓ Clearly identified affiliate link ↓ Reader chooses whether to visit

The affiliate recommendation is most useful when it genuinely relates to the information the visitor is already looking for.

// disclosure

Affiliate relationships should be clearly disclosed

Visitors should be able to understand when a commercial relationship exists between a publisher and a product or service being promoted.

Affiliate disclosure: This page contains affiliate links. If you make a purchase through one of these links, I may receive a commission.

The disclosure should be clear and positioned so that readers can understand the commercial relationship before or when they encounter the affiliate promotion.

// html

Affiliate links are still ordinary web links

An affiliate URL can be placed inside an HTML anchor:

<a href="https://example.com/?ref=affiliate123" target="_blank" rel="noopener noreferrer sponsored" > Visit Example </a>

The target="_blank" attribute requests that the destination opens in a new browsing context, normally a new tab.

The sponsored relationship value can be used to identify links created as part of advertising or other compensated arrangements.

// analytics

Affiliates can measure performance

Metric Meaning
Impressions How often content or advertising is shown
Clicks Visitors who follow an affiliate link
Conversions Visitors completing the desired action
Commission Affiliate earnings generated
Conversion Rate Percentage of qualifying visitors who convert
// conversion rate

Conversion rate measures results

Suppose:

100 affiliate-link visitors 5 purchases

The conversion rate would be:

5 ÷ 100 × 100% = 5%
// example

A simple affiliate website example

FreelanceCoder.uk ↓ Publishes: "What Is Web Hosting?" ↓ Explains hosting ↓ Mentions relevant hosting provider ↓ Affiliate link ↓ Reader visits provider ↓ Reader purchases ↓ Possible commission
// reversals

A recorded commission is not always final

Affiliate programmes can have validation periods.

A commission may potentially be cancelled if, for example, the underlying purchase is refunded, cancelled or determined not to satisfy the programme's rules.

Sale ↓ Commission recorded ↓ Validation period ↓ Approved or Reversed
// payouts

Programmes can have payout rules

An affiliate programme may specify:

Minimum Payout Payment Schedule Currency Payment Method Validation Period Commission Rate

These terms differ from programme to programme.

// value

Affiliate marketing works best when the content has value

Useful information + Relevant recommendation + Clear disclosure + Reader choice ↓ Sustainable affiliate content

Publishing useful information gives visitors a reason to find the website independently of the affiliate link.

// earnings

Affiliate marketing does not guarantee income

Joining an affiliate programme does not automatically produce sales or commissions.

Results can depend on factors such as:

Traffic Audience Content Quality Search Visibility Trust Conversion Rate Commission Rate
// mental model

The simplest way to think about affiliate marketing

Create useful content ↓ Recommend relevant product ↓ Disclose commercial relationship ↓ Visitor follows tracked link ↓ Visitor chooses whether to buy ↓ Merchant records qualifying conversion ↓ Affiliate may receive commission
// summary

Marketing linked to results.

Affiliate marketing is a performance-based marketing model in which publishers promote products or services using trackable links, codes or other attribution methods. When their marketing generates a qualifying sale, lead or action, the affiliate may receive a commission or other reward.

What Is an IP Address?

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