Computer Networks · HTTP and Application Layer
Why These Five Protocols Are Needed to Build a Website
Overview
The application layer contains thousands of protocols, but only five are in the syllabus (and asked in GATE): DNS, FTP, HTTP, SMTP, and POP. These five together are exactly what is needed to build and implement any website, each handling one specific job.
Key concepts
- DNS (Domain Name System): Maps a website's domain name to an IP address.
- FTP (File Transfer Protocol): Transfers the web pages/files built locally to the remote server.
- HTTP (HyperText Transfer Protocol): Lets users fetch the web pages from the running web server.
- SMTP (Simple Mail Transfer Protocol): Sends emails, e.g. from a "Contact Us" facility.
- POP (Post Office Protocol): Retrieves/opens the emails that were sent.
- Hosting provider: A rented machine (e.g. from GoDaddy or Amazon Web Services, AWS) that runs the web server, used because a website needs 24x7, 100% availability.
- ICMP: Works at the network layer, not the application layer (it is sometimes mistakenly listed among application-layer protocols).
How it works
- Website name → DNS: The website has a domain name given out to everyone; DNS maps/converts that domain name to an IP address.
- Preparing pages locally → need a remote server: Web pages are prepared on the local host (home computer).
The website cannot run from home because it needs 100% availability, 24x7, all the time, and home computers are unreliable (power failure, internet failure, and many other problems).
A machine is rented from a hosting provider such as GoDaddy or AWS, and the web server is hosted on it. - Moving pages to the server → FTP: The web pages built at home are transferred to the remote server location using FTP, so that people can fetch them.
- Serving pages to users → HTTP: Once the website is started and the web server is running, users get the web pages using HTTP.
- Contact/email facility → SMTP and POP: A "Contact Us" button gives an email ID; emails sent there must be directed to your mailbox. SMTP sends emails, and once an email is sent using SMTP it can be opened/retrieved using POP.
Comparison
| Protocol | Job in building a website |
|---|---|
| DNS | Maps the website's domain name to an IP address |
| FTP | Transfers the web pages/files built at home to the remote server |
| HTTP | Lets users fetch the web pages from the running web server |
| SMTP | Sends emails (e.g., from the "Contact Us" facility) |
| POP | Retrieves/opens the emails that were sent |
Revision summary
- Only five application-layer protocols are in the syllabus: DNS, FTP, HTTP, SMTP, POP.
- These five protocols are sufficient to build and implement any website.
- ICMP is a network-layer protocol, not an application-layer protocol — a common trap.
- A website cannot be hosted on a home computer: it needs 24x7, 100% availability, while home computers suffer power and internet failures.
- SMTP sends email; POP retrieves email — do not swap their roles.
- FTP moves files (web pages) to the server; HTTP serves them to users.
Previous-year exam insights
- DNS is an application-layer protocol that normally runs over UDP on port 53 (TCP port 53 for zone transfers and large responses); a resolver queries the hierarchy root → TLD → authoritative name server, using iterative queries from the local resolver and a recursive query from the host.
- HTTP is a stateless request-response protocol over TCP port 80 (HTTPS over TLS on port 443); it uses methods such as GET, POST, HEAD, PUT and DELETE, and status codes such as 200 OK, 301 Moved Permanently, 400 Bad Request, 404 Not Found and 500 Internal Server Error.
- FTP uses two TCP connections: a control connection on server port 21 that lasts for the whole session, and a separate data connection (active mode: server port 20 connects to the client; passive mode: client connects to a server-chosen port).
It is therefore called an out-of-band control protocol. - SMTP (TCP port 25) is a push protocol used to send mail from client to server and between servers; POP3 (TCP port 110) and IMAP (TCP port 143) are pull protocols used by the receiver to retrieve mail.
POP3 downloads and typically deletes mail from the server, while IMAP keeps mail on the server and synchronises folders. - Email delivery uses SMTP in both hops (sender's mail client to sender's mail server, and sender's mail server to receiver's mail server); the receiver's client uses POP3/IMAP, not SMTP, to fetch mail.
MIME extends SMTP to carry non-ASCII text, images and attachments. - ICMP (network layer, carried in IP datagrams) is used by ping (echo request/reply) and traceroute (TTL expiry), and ARP (mapping IP to MAC) is a link-layer/network-layer helper protocol; neither is an application-layer protocol, though both are often confused with one.
Website Build Workflow with Five Protocols
Drawing the diagram…
Shows how DNS, FTP, HTTP, SMTP and POP each handle one job in building and running a website.