Force HTTPS & remove WWW using HTACCESS

There is no need to include "www" in your website's address. It was a URL prefix added in the early days of the web and caught on by accident. Saying "www dot" adds ten extra syllables to a domain name. The letter "w" happens to be the only letter in the English alphabet that has more than one syllable – and it has three.

Every URL with "www" includes four extra characters (including the extra period). Since each character requires one byte (or eight bits) of data, a URL with "www." requires 32 more bits compared to a URL without the prefix. 32 bits is a relatively small amount of data, but when you multiply it by the billions of URLs visited every day, that's a lot of extra processing and bandwidth.

Does your web address require "www" or not? While most web servers redirect to the correct URL, some don't. Just remove "www" and avoid the confusion altogether.

# Force HTTPS and remove WWW
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [OR,NC]
RewriteCond %{HTTPS} off  
RewriteRule ^(.*)$ https://domain.com/$1 [R=301,L]

I do not use cookies on this website

🍪🍪 What cookies?


Your privacy is important. That's why this website doesn't track visitors with fingerprinting, your IP address or cookies.


Web analytics data is your own. Reclaim it.

Gain back control with a privacy-focused web analytics platform (using a cookie-less architecture) from: Data Centurion.