Site Won't Open, DNS or SSL? Basic Networking Concepts Every Web Developer Should Know — post content
A client calls: “Your site won’t open.” It opens fine for you. Or you moved a domain to a new server and one office sees the new site while the next still sees the old one. Most of these problems are not code problems, they are network problems. The basic networking concepts every web developer should know are IP addresses, DNS, ports, NAT, subnets, DHCP, TCP and UDP, HTTP, HTTPS, TLS, firewalls, proxies and load balancers. Once you know them, “why won’t it open?” becomes a question you answer by elimination, not by guessing.
Why should a web designer or developer care about networking?
To a client, “the site is broken” is one sentence. Behind it there may be five different causes: the domain points to the wrong place, a DNS change has not propagated yet, a certificate has expired, a port is closed on the server, or a firewall is dropping requests. Each has a different fix, and finding the right one means knowing which layer you are looking at.
OSI and TCP/IP: seven layers on paper, four in practice
The OSI model splits networking into seven layers: physical, data link, network, transport, session, presentation and application. It is a reference model that helps you ask “at which layer is the problem?” The internet itself runs on the four-layer TCP/IP model: link, internet, transport and application.
- Link layer: cables, Wi-Fi, MAC addresses.
- Internet layer: IP addresses and routing.
- Transport layer: TCP, UDP and ports.
- Application layer: HTTP, DNS and TLS, the protocols you see most directly.
A practical rule: if the site does not open at all, work from the bottom up (connection, IP, port, certificate, application). If it opens but shows the wrong content, you are already at the top.
Packets, IP addresses, routers and switches
Data does not travel as one piece. It is split into small packets, each stamped with source and destination IP addresses, and the receiver reassembles them. IPv4 uses four-number addresses such as 192.0.2.10; IPv6 has a far larger address space. A site with both has an A record and an AAAA record in DNS.
A switch connects devices inside one local network and forwards frames by MAC address. A router connects different networks; it is your exit door to the internet. The “modem” box at home usually combines both plus a Wi-Fi access point, which is why people mix them up.
What happens when a device joins a network: MAC, DHCP, ARP
- The device’s hardware address, its MAC address, identifies it on the local network.
- DHCP kicks in: the device asks for an address, the router makes an offer, the device accepts and the router confirms. The device ends up with an IP address, a gateway and a DNS server.
- To send a packet to a given IP on the local network, the device needs that IP’s MAC address. ARP asks “who has this IP?” and the owner answers with its MAC.
- Now packets can reach the right device.
If an office reports an “IP address conflict,” the usual cause is a manually assigned static address that collides with one DHCP handed out.
Subnets and CIDR: understand /16 and /24 once
In CIDR notation, the number after the slash says how many bits identify the network. The rest identify hosts.
- /24: 256 addresses (254 usable for devices in the traditional sense). Enough for a small office.
- /16: 65,536 addresses. Used by large organizations and cloud virtual networks.
A common notation mistake is writing 10.0.1.0/16. A /16 means the first two numbers define the network, and the remaining bits of the network address must be zero. The correct form is 10.0.0.0/16. If you only mean the 10.0.1.x range, write 10.0.1.0/24.
NAT: how a dozen devices share one public address
“Every device has an IP address” is only half true. Devices at home have private addresses that are not routed on the internet. RFC 1918 reserves three private blocks: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. The router uses NAT to translate those private addresses into one public IP on the way out and to send replies back to the right device.
The consequence: a test site running on a laptop in your office is not reachable from outside. To expose it you would set up port forwarding on the router, which also creates risk, so use a tunnel or proper hosting unless you have to.
DNS and ports: names to addresses, addresses to services
DNS turns a domain name into an IP address. The records you meet most often:
- A / AAAA: map a name to an IPv4 / IPv6 address.
- CNAME: points one name at another, like www at the root domain.
- MX: tells mail where to go.
- TXT: used for domain verification and email security records.
Records carry a TTL (time to live). After you change a record, resolvers that cached the old answer may keep serving it until the TTL runs out. That is what people call “DNS propagation.” Lowering the TTL before a migration is a good habit.
Ports separate services on the same machine: the IP address is the building, the port is the apartment number. Common ones: 22 (SSH), 80 (HTTP), 443 (HTTPS), 53 (DNS) and 3306 (MySQL). Leaving the database port open to the internet is a classic mistake on freshly set-up servers.
Three commands for a “site won’t open” diagnosis
- nslookup yourdomain.com or dig yourdomain.com: which IP does the name resolve to? If it is not the one you expect, the problem is DNS.
- curl -I https://yourdomain.com: fetches only the response headers, so you quickly see a 200, a 301, a 5xx or a certificate error.
- A port scanner such as nmap to check which ports are open on your own server. Only use it on systems you own or have permission to test.
TCP and UDP: reliable delivery or speed?
TCP sets up a connection first with a three-way handshake (the client sends SYN, the server answers SYN-ACK, the client confirms with ACK), then delivers data in order and without gaps. Web pages, email and file transfers traditionally use TCP. UDP has no connection and no delivery guarantee, but it is fast. DNS queries, online games and video calls are typical UDP uses. HTTP/3 runs on a newer transport called QUIC, which is why a network that blocks UDP can break HTTP/3 connections.
HTTP, HTTPS and TLS: why you see “Your connection is not private”
HTTP is how a browser and a server talk; HTTPS is the same conversation encrypted with TLS. The browser checks the server’s certificate, both sides agree on a key, and everything after that is encrypted. TLS 1.3 is the current version; TLS 1.0 and 1.1 were formally deprecated by RFC 8996.
Common causes of the browser warning:
- The certificate has expired.
- It was issued for a different name (www and non-www count as different).
- The intermediate certificate is missing on the server.
- The computer’s clock is wrong.
- The page is HTTPS but loads an image or script over plain HTTP.
Firewalls, VPNs, proxies and load balancers: security and scale
- Firewall: allows some traffic by rule and drops the rest. Opening only 80 and 443 to the world and 22 only to your own IP is a sensible start.
- VPN: an encrypted tunnel between your device and a network. Sites see the VPN server’s address, but the VPN provider can see your traffic, so it does not make you invisible.
- Forward proxy: goes out to the internet on behalf of clients. A reverse proxy sits in front of servers; Nginx or Cloudflare play that role.
- Load balancer: spreads incoming requests across several servers.
A small business site often needs one server, a firewall and maybe a reverse proxy in front. A high-traffic system puts several servers behind a load balancer so it can add capacity as load grows and stay up when one server fails.
Frequently asked questions
What is the difference between a switch and a router?
A switch connects devices inside one local network. A router connects different networks and sends traffic to the internet. The home modem usually does both.
Does a VPN hide my IP address?
Websites see the VPN server’s address instead of yours, but the VPN provider sits in the path of your traffic, so you are moving trust, not becoming anonymous.
Is 10.0.1.0/16 a valid way to write a network?
No. The correct /16 network is 10.0.0.0/16. To describe only 10.0.1.x, write 10.0.1.0/24.
How long does a DNS change take to propagate?
It depends on the record’s TTL and on resolvers that cached the old answer. Lowering the TTL ahead of the change usually shortens the switch, but no fixed time can be promised.
In short
You do not need to memorize networking; you need to learn to split a problem into layers. If a site will not open, check DNS first (nslookup, dig), then the certificate and HTTP response (curl -I), the server's ports if needed, and the application last, and “the site is broken” turns into a concrete cause.