Networking

What is a Port?

A port is a numbered endpoint (0-65535) for network communication on a server. Different services use specific ports — web traffic uses port 80 (HTTP) and 443 (HTTPS), while SSH uses port 22 and FTP uses port 21.

How Does Port Work?

Ports allow a single server with one IP address to run multiple services simultaneously. When a browser connects to a website, it connects to the server's IP address on port 443 for HTTPS. The server listens on that port and routes the connection to the web server software. Think of the IP address as a building address and ports as apartment numbers.

In hosting, proper port configuration is essential for security. Firewalls should only allow traffic on ports that your services actually use. Common ports include 80 (HTTP), 443 (HTTPS), 22 (SSH), 21 (FTP), 3306 (MySQL), 5432 (PostgreSQL), and 587 (SMTP). Changing default ports (like moving SSH from 22 to a non-standard port) is a basic security hardening technique.

Related Terms