Title: Forcing HTTPS / W3 Total Cache
Last modified: August 22, 2016

---

# Forcing HTTPS / W3 Total Cache

 *  [mkurent](https://wordpress.org/support/users/mkurent/)
 * (@mkurent)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/forcing-https-w3-total-cache/)
 * We are trying to force all users to HTTPS.
 * The code that is inserted into .htaccess is
 * RewriteCond %{HTTPS} off
    RewriteRule (.*) [https://%](https://%){HTTP_HOST}%{
   REQUEST_URI} [L,R=301]
 * When we put it at the top of the .htaccess forcing does not work. Only if it 
   is put at the end of the file.
 * The second annoyance is that when we run compatibility test inside W3TC the .
   htaccess file is overwritten by plugin. Whatever we have included into the file
   is lost.
 * Is there any other more correct way to force HTTPS and that solution is fully
   compatible with W3TC?
 * [https://wordpress.org/plugins/w3-total-cache/](https://wordpress.org/plugins/w3-total-cache/)

The topic ‘Forcing HTTPS / W3 Total Cache’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [mkurent](https://wordpress.org/support/users/mkurent/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/forcing-https-w3-total-cache/)
 * Status: not resolved