HTTP works by using a user agent to connect to a server. The user agent could be a web browser or spider. The server must be located using a URL or URI. This always contains http:// at the start. It normally connects to port 80 on a computer.

A more secure version of HTTP is called HTTPS. This contains https:// at the beginning of the URL. It encrypts all the information that is sent and received. This can stop malicious users such as hackers from stealing the information. HTTPS is often used on payment websites. HTTPS uses port 443 for communication instead of port 80.

Request line, such as GET /images/logo.gif HTTP/1.1, which requests the file logo.gif from the /images directory

Headers, such as Accept-Language: en

An empty line

An optional message body

The request line and headers must all end with two characters: a carriage return followed by a line feed, often written <CR><LF>. The empty line must consist of only <CR><LF> and no other whitespace. In the HTTP/1.1 protocol, all headers except Host are optional.

HTTP (Hyper Transfer Protocol) is a communication protocol and it is used to send and receive webpages and other data files on the internet. A more secure version of HTTP is called HTTPS (Hyper Transfer Protocol Secure). It encrypts all the information sent and received. This can stop hackers from stealing the information; HTTPS is often used on payment websites.