Skip to main content

Hypertext Transfer Protocol


aliases:

  • HTTP
  • HTTPS

HTTP: The foundation of web technology that serves website content to client browsers. Runs on TCP ports 80 and 443 for the Secure version.

Clients connect to the server hosting the website, and asks for a specific resource using a URL. The server can choose to approve this request or respond with one of the many HTTP error codes.

Headers and Payloads

The response and request formats are defined in the HTTP header. The payload is usually set to serve HTML as plaintext files. Web browsers interpret the HTML and display that to the end user. The browser is also responsible for fetching other resources tagged in the HTML using URLS, like images, videos, and other assets.

Methods

HTTP also has several mechanisms for the end user to interact with and even send data to the web server, most notably through the HTTP POST method.

  • [i] HTTP was originally a stateless protocol, meaning the web server didn't have to store any information about user sessions. Instead, servers can optionally be configured to save data across sessions using cookies and other scripting/programmable methods. However, with the introduction of HTTP2 that added more state-preserving features, more and more people assert that HTTP is now a stateful protocol.

Web Servers

Organizations that have an online presence usually rely on a website. Websites are hosted using HTTP servers connected to the internet. Larger organizations can host their websites themselves, but most other smaller ones can lease a server from an ISP to do that job on their behalf.

  • Dedicated Server - The ISP allocates your own private server computer. Management of that system can come for an extra charge.

  • VPS - The ISP allocates you a VM on a physical server, isolated from other instances by a hypervisor.

  • Cloud Hosting - Your website is hosted on a cloud server across several physical computers, allowing for scalability if demand increases.

  • Shared Hosting - Your website is hosted on a private directory on a shared server, where performance of your website can be affected by the other ones hosted on the server.

  • [i] There are three main web server platforms in deployment today. Nginx, Apache, and Microsoft IIS.

Secure

Sent over port 443, using TLS. Most browsers use HTTPS by default. The padlock icon is present in most browsers, indicating that HTTPS is being used. Clicking on it allows the end user to examine the certificate the webpage provided, along with the Certificate Authority that issued it.