Force https and www with htaccess

Place the following stanzas in an .htaccess file in the root web directory:

Force www

Automatically redirect from to

Force https

Automatically redirect to a secure (https://) URL


  • Requires mod_rewrite
  • Requires AllowOveride to be set to On

Leave a Reply

Your email address will not be published. Required fields are marked *

×Mike Everhart

Need Some More Help? Let's Talk!

I'd love to work with you! Fill out the form below to schedule a free consultation to discuss your needs and how I can help.

Need More Help?