Title: redirect to https doesn&#039;t work (unless..)
Last modified: August 30, 2016

---

# redirect to https doesn't work (unless..)

 *  Resolved [mhenschel](https://wordpress.org/support/users/mhenschel/)
 * (@mhenschel)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/redirect-to-https-doesnt-work-unless/)
 * Hi,
    I switched my whole site to https. I have a redirect to https in .htaccess.
 *     ```
       RewriteCond %{HTTPS} !=on
       RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
       ```
   
 * I first had put this code in the # BEGIN WordPress block after “RewriteEngine
   On”. When Cachify is activated (HDD cache), I can still access the site with 
   http.
 * I figured out that I had to add the above code already in the cachify htaccess
   code block, right after “RewriteEngine On”. Then it works.
 * This may be obvious to experts but maybe not to beginners that follow instructions
   from the web.
 * Maybe this information can help others with the same problem.
 * [https://wordpress.org/plugins/cachify/](https://wordpress.org/plugins/cachify/)

Viewing 1 replies (of 1 total)

 *  [Jan Reimers](https://wordpress.org/support/users/janreim/)
 * (@janreim)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/redirect-to-https-doesnt-work-unless/#post-6738499)
 * Thanks for the solution! That was exactly what I was searching for.

Viewing 1 replies (of 1 total)

The topic ‘redirect to https doesn't work (unless..)’ is closed to new replies.

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

## Tags

 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [SSL](https://wordpress.org/support/topic-tag/ssl/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jan Reimers](https://wordpress.org/support/users/janreim/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/redirect-to-https-doesnt-work-unless/#post-6738499)
 * Status: resolved