Title: Site not redirecting to https
Last modified: August 30, 2016

---

# Site not redirecting to https

 *  [brandonvd](https://wordpress.org/support/users/brandonvd/)
 * (@brandonvd)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/site-not-redirecting-to-https/)
 * I’m having a problem with making my site full https and I can’t figure it out.
 * I’ve added and tried numerous different things to my .htaccess file for a redirect,
   but nothing seems to catch.
 * I already have the setting correctly set too in the admin.
 * The main problem is that if you go to [http://blog.epiccosplay.com](http://blog.epiccosplay.com)
   with IE and Safari, it won’t redirect you. Safari tries to connect to localhost
   and IE says the page can’t be displayed.
 * If you go to [https://blog.epiccosplay.com](https://blog.epiccosplay.com) the
   page loads fine.
 * So the problem would seem to be a redirect issue. This is the reason why I put
   the different redirect codes into the .htaccess file. Unfortunately everything
   I’ve put in there has been totally ignored.
 * Does any one have any ideas? I’d really appreciate any help.
 * Thanks,
 * Brandon

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [SJW](https://wordpress.org/support/users/whitsey/)
 * (@whitsey)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/site-not-redirecting-to-https/#post-6823583)
 * This is what your htaccess should look like (or a variation of this):
 * RewriteEngine On
    RewriteBase / RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*)
   [https://www.domain.com/$1](https://www.domain.com/$1) [R=301,L]
 * Then every piece of traffic will be redirected to https
 *  Thread Starter [brandonvd](https://wordpress.org/support/users/brandonvd/)
 * (@brandonvd)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/site-not-redirecting-to-https/#post-6823584)
 * That is one of the ones I tried and unfortunately it doesn’t work.
 * I just copied this to my .htaccess file again to be sure and it didn’t make any
   difference.
 * Any other ideas?
 * Thanks,
 * Brandon
 *  [SJW](https://wordpress.org/support/users/whitsey/)
 * (@whitsey)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/site-not-redirecting-to-https/#post-6823709)
 * I have this in my htaccess and it works perfectly.
 * You might have browser caching issues that you need to look at
 *  Thread Starter [brandonvd](https://wordpress.org/support/users/brandonvd/)
 * (@brandonvd)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/site-not-redirecting-to-https/#post-6823717)
 * Shannon,
 * I know, it is super frustrating. I have several sites that are fine, but this
   one is being a pain in the neck.
 * I know it isn’t a caching problem since I’ve tried it on multiple computers and
   on Browserstack.
 * It might be an issue with the server too, I’m not sure.
 * Thanks,
 * Brandon
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [10 years, 7 months ago](https://wordpress.org/support/topic/site-not-redirecting-to-https/#post-6823718)
 * It’s your server. Your using 2 separate web servers for http (nginx) and https(
   Apache2).
 * The `.htaccess` doesn’t work on the nginx that you use for http.
 *     ```
       $ curl -I http://blog.epiccosplay.com/
       HTTP/1.1 301 Moved
       Server: nginx
       Date: Wed, 09 Dec 2015 02:45:18 GMT
       Content-Type: text/html; charset="utf-8"
       Content-Length: 98
       Connection: keep-alive
       Location: https://:2083/
       Cache-Control: no-cache, must-revalidate
       Pragma: no-cache
       ```
   
 * And your HTTPS version is doing this correctly.
 *     ```
       $ curl -I https://blog.epiccosplay.com/
       HTTP/1.1 200 OK
       Date: Wed, 09 Dec 2015 02:46:23 GMT
       Server: Apache/2.2.29 (Unix) mod_ssl/2.2.29 OpenSSL/1.0.1e-fips mod_bwlimited/1.4
       X-Powered-By: PHP/5.4.38
       X-Pingback: https://blog.epiccosplay.com/xmlrpc.php
       Link: <https://wp.me/2CVoj>; rel=shortlink
       Vary: User-Agent,Accept-Encoding
       Content-Type: text/html; charset=UTF-8
       ```
   
 * Can you get your host to add this for your nginx config?
 *     ```
       location / {
                       return 301 https://$http_host$request_uri;
               }
       ```
   
 * That goes inside your `server` section of the config and will redirect to the
   https version of your site.
 *  [Digico Paris](https://wordpress.org/support/users/digico-paris/)
 * (@digico-paris)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/site-not-redirecting-to-https/#post-6823720)
 * Tested right now from Paris (Fiber 500Mb/s), blank page now.
 *  [Digico Paris](https://wordpress.org/support/users/digico-paris/)
 * (@digico-paris)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/site-not-redirecting-to-https/#post-6823721)
 * And i confirm, if you’re on Nginx, check all that like Jan Dembowski advises 
   you.
 * I thought of a wrong SSL certificate, but wrong idea you can do that later, https
   will work even if not exactly authentified.
 * I’m more worried about ports for Nginx, default https:// port on server that 
   should be setup for WP and so (Nginx default port: 8080 on http).
 *  Thread Starter [brandonvd](https://wordpress.org/support/users/brandonvd/)
 * (@brandonvd)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/site-not-redirecting-to-https/#post-6823730)
 * Thank you a ton guys. That was exactly the problem. I’m not sure why Nginx was
   installed on that server, but I disabled it and now the redirect works perfectly.
 * I did try the code above in the config file, but for some reason it didn’t work.
 * I definitely appreciate all of the help.
 * Brandon

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Site not redirecting to https’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 4 participants
 * Last reply from: [brandonvd](https://wordpress.org/support/users/brandonvd/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/site-not-redirecting-to-https/#post-6823730)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
