Title: Http version not redirecting completely After changing url to https
Last modified: March 29, 2020

---

# Http version not redirecting completely After changing url to https

 *  [psahani](https://wordpress.org/support/users/psahani/)
 * (@psahani)
 * [6 years ago](https://wordpress.org/support/topic/http-version-not-redirecting-completely-after-changing-url-to-https/)
 * I want to redirect my all traffic to [https://example.com](https://example.com)
   version of my site. First I am changing http to https in “settings > general”.
   Then adding a redirect in .htaccess file. But wherever I am adding redirection
   code in .htaccess file my site stop working and browser shows too many http redirect
   error.
 * I have tried all possible http to https redirect code in .htaccess file but nothing
   worked. I have tried clearing website cache, browser cache but no result.
 * Finally I removed redirect code from .htaccess file and added my site url with
   https in wp-config file. See the code below..
 * define( ‘WP_HOME’, ‘[https://example.com&#8217](https://example.com&#8217); );
   
   define( ‘WP_SITEURL’, ‘[https://example.com&#8217](https://example.com&#8217););
   $_SERVER[“HTTPS”] = “on”;
 * After adding above 3 lines my site is working but problem is only [http://example.com](http://example.com)
   not redirecting to [https://example.com](https://example.com). Otherwise everything
   redirecting to [https://example.com](https://example.com).
 * My website is [http://www.digitalpromit.com](http://www.digitalpromit.com)
 * Please solve this problem.
    -  This topic was modified 6 years ago by [psahani](https://wordpress.org/support/users/psahani/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fhttp-version-not-redirecting-completely-after-changing-url-to-https%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [Loc_rabbirt](https://wordpress.org/support/users/loc_rabbirt/)
 * (@loc_rabbirt)
 * [6 years ago](https://wordpress.org/support/topic/http-version-not-redirecting-completely-after-changing-url-to-https/#post-12599818)
 * I see a lot error: Access-Control-Allow-Origin
 * Example: Access to font at ‘[https://digitalpromit.com/wp-content/themes/Newspaper/images/icons/newspaper.woff?17&#8217](https://digitalpromit.com/wp-content/themes/Newspaper/images/icons/newspaper.woff?17&#8217);
   from origin ‘[http://digitalpromit.com&#8217](http://digitalpromit.com&#8217);
   has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present
   on the requested resource.
 * You must use search and replace plugin to update all the links in your site then
   check it again. I also have my question about redirect http to https and non-
   www to www. You can try check it and use my code in your .htaccess file then 
   check it again.

Viewing 1 replies (of 1 total)

The topic ‘Http version not redirecting completely After changing url to https’ 
is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Loc_rabbirt](https://wordpress.org/support/users/loc_rabbirt/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/http-version-not-redirecting-completely-after-changing-url-to-https/#post-12599818)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
