Open In App
Related Articles

What are the differences between HTTP, FTP, and SMTP?

Improve Article
Save Article
Like Article

HTTP stands for Hyper Text Transfer Protocol, FTP for File Transfer Protocol, while SMTP stands for Simple Mail Transfer Protocol. All three are used to transfer information over a computer network and are an integral part of today’s internet.

Why do we need three Protocols for transferring files? 
We need the three protocols as they all serve different purposes. These are HTTP, FTP, and SMTP. 

  1. HTTP is the backbone of the World Wide Web (WWW). It defines the format of messages through which Web Browsers (like Firefox, Chrome) and Web Servers communicate, whilst also defining how a web browser should respond to a particular web browser request. 
  2. FTP is the underlying protocol that is used to, as the name suggests, transfer files over a communication network. It establishes two TCP connections: Control Connection to authenticate the user, and Data Connection to transfer the files. 
  3. SMTP is what is used by Email servers all over the globe to communicate with each other so that the assignment you submitted at 11:59 pm reaches your professor’s inbox within the deadline. 

How do their implementations differ? 
All three are Application Layer Protocols, using TCP as the underlying Transport layer protocol. But the way they use it and are implemented in general is vastly different. The below table briefly differentiates between them. 

Port number8020 and 2125
Type of band transferIn-bandOut-of-bandIn-band
StateStatelessMaintains state
Number of TCP connections12 (Data Connection and Control Connection)1
Type of TCP connectionCan use both Persistent and Non-persistentPersistent for 
Control connection.
Non-persistent for 
Data Connection
Type of ProtocolPull Protocol (Mainly)Push Protocol (Primarily)
Type of TransferTransfer files between the Web server and Web clientTransfer directly between computersTransfers mails via Mail Servers
  • HTTP is stateless. A Stateless protocol implies that the HTTP Web Server does not maintain which request had originated from which user. Hence, to give customized service to the user, HTTP uses Cookies
  • FTP is Out-of-band, as it uses a separate channel to send data (Data connection), as to send control information (Control connection). 
  • As SMTP is much older than HTTP, it restricts all its messages to be in 7-bit ASCII format. Whereas HTTP has no such restriction. 
  • HTTP encapsulates each file in a different HTTP message. Whereas, SMTP places all the contents of a mail in a single message. 
Last Updated : 15 Nov, 2022
Like Article
Save Article
Similar Reads