Contents
With plain HTTP, pages, passwords and contact forms travel as readable text, and your ISP or anyone on a public Wi-Fi network can see them. With HTTPS the content is encrypted; an observer only sees that you connected to a particular domain. HTTPS is no longer optional either: modern browsers warn on http pages, and features such as geolocation, notifications and service workers only work on secure pages.
How HTTPS works
- The browser connects to the server on port
443. - The two sides run a TLS handshake and the server presents its SSL certificate.
- The browser verifies the certificate, then both sides create a temporary encryption key.
- HTTP requests and responses travel fully encrypted inside that connection.
HTTP vs HTTPS
| HTTP | HTTPS | |
|---|---|---|
| Default port | 80 |
443 |
| Encryption | None | TLS |
| In the browser | “Not secure” warning | Padlock |
| HTTP/2 and HTTP/3 | Not supported by browsers | Supported |
Example: sending every visitor to HTTPS
A certificate alone isn’t enough; you need to redirect people who open the old address. Add these lines at the top of the .htaccess file in your site’s folder:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
A 301 redirect is permanent, so search engines carry the old pages’ rankings over to the new addresses. You can build other rules with the .htaccess redirect generator.
Common problems after switching
- Broken padlock: image or CSS links still start with
http://, the mixed content problem. - Redirect loops: the redirect is enabled in a WordPress plugin, in .htaccess and in a proxy service all at once, giving
ERR_TOO_MANY_REDIRECTS. - Old URLs in the database: the site address in WordPress settings is still http.
On ArabyHost
A free SSL certificate is issued automatically through AutoSSL and Let’s Encrypt for every domain on your account, so HTTPS works with nothing to buy or install. Once the certificate is active, turn on the redirect as in the force HTTPS guide, then add an HSTS policy if you want browsers to remember to always use HTTPS.
FAQ
Does a site with no logins or payments need HTTPS?
Yes. Browsers label every http page "Not secure", and HTTPS also stops networks from injecting ads or altering your pages on the way to the visitor.
Does HTTPS affect Google rankings?
Google has used it as a light ranking signal since 2014. More importantly, it avoids browser warnings that make visitors leave straight away.
Why does my site show "Not secure" even with a certificate?
Usually the page loads images or scripts over http (mixed content), or the visitor opened the http version and there's no automatic redirect to https.