Skip to content
Web and HTTP2 min read

What is HTTP?

Short answer

HTTP (Hypertext Transfer Protocol) is the set of rules a browser uses to request a page or file from a server, and the server uses to reply with the content and a status code such as 200 or 404. HTTPS is the encrypted version over TLS and is now the standard for every website.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. What a request and response look like
  2. The main request methods
  3. Key ideas
  4. On ArabyHost

Everything on a web page, from HTML, images and fonts to API responses, reaches you over HTTP. The protocol follows a simple pattern: the client sends a request, the server sends a response, and that repeats for every file the page needs.

What a request and response look like

GET /about/ HTTP/1.1
Host: example.com
Accept-Language: ar

HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Cache-Control: max-age=3600
  • The request’s first line: the method, the path and the protocol version.
  • Headers: extra information such as language, content type, cookies and how long to cache.
  • The response’s first line: the status code that tells you how the request went.

You can see any site’s headers with curl -I https://example.com or in the Network tab of your browser’s developer tools.

The main request methods

Method Used for
GET Fetching a page or data without changing anything
POST Sending data, e.g. a sign-up form or an order
PUT / PATCH Updating existing data in an API
DELETE Removing a resource
HEAD Fetching only the headers, no content

Key ideas

  • Stateless: every request stands alone and the server doesn’t remember the previous one. That’s why cookies are used to keep you logged in and to hold a shopping cart.
  • HTTP vs HTTPS: plain HTTP runs on port 80 and sends data in the clear. HTTPS encrypts it with TLS on port 443, and browsers flag sites without it as “Not secure”.
  • Many requests per page: a single page can take dozens of requests: the HTML first, then CSS, JavaScript, images and fonts, each one a separate HTTP request with its own response and status code.
  • Versions: HTTP/1.1 is still common, while HTTP/2 and HTTP/3 load pages with many files faster. The principle is the same: request, then response.

On ArabyHost

On ArabyHost, the LiteSpeed web server handles your site’s HTTP requests, and a free SSL certificate (AutoSSL / Let’s Encrypt) is issued for your site automatically so it works over HTTPS. Once the certificate is in place, redirect all HTTP traffic to HTTPS with the force HTTPS guide.

FAQ

What's the difference between HTTP and HTTPS?

HTTP sends data as plain text that anyone on the network path can read or alter. HTTPS encrypts the connection with TLS using an SSL certificate, so passwords and payment details stay protected.

What's the difference between GET and POST?

GET requests data and puts its parameters in the URL; it's used for opening pages and searches. POST sends data in the request body and is used for forms, logins and anything that changes something.

How can I see a site's HTTP headers?

Run `curl -I https://example.com` in a terminal, or open your browser's developer tools with F12, go to the Network tab and pick any request.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.