Skip to content

Single (Non-)WWW and HTTPS Redirect in Apache

View on Twitter

💡 A quick way to speed up a site is to redirect to (non-)www and https in one step.

Using Apache, the following config in your .htaccess file redirects to non-www and https.


Redirecting from (non-)www and https in a single step with Apache. Source available at:
You might also like
Disable Nginx Server Header Read tip
Large Node.js Project Example to Learn From Read tip
Tiny JSON DB for Quick Prototyping Read tip