Title: Redirect Error
Last modified: August 22, 2016

---

# Redirect Error

 *  [husdom](https://wordpress.org/support/users/husdom/)
 * (@husdom)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/redirect-error-10/)
 * I can not figure out the simplest of issues… Please teach a man to fish…
 * I changed my settings in Settings>General
 * WordPress Adress URL – [https://foxandhare.net](https://foxandhare.net)
 * Site Address URL – [https://foxandhare.net](https://foxandhare.net)
 * I added the ‘s’. I have two other WP sites that I did the same thing to when 
   I added https.
    Or at least that is what godaddy told me to do.
 * After doing this and installing and activating this plugin I continue to get 
   a redirect issue when trying to load my webpage.
 * [http://www.foxandhare.net](http://www.foxandhare.net)
 * Any ideas on what I may be doing wrong?
 * Best wishes,
 * Mr Fox
 * [https://wordpress.org/plugins/wordpress-https/](https://wordpress.org/plugins/wordpress-https/)

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

 *  [SystemRevolution](https://wordpress.org/support/users/systemrevolution/)
 * (@systemrevolution)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/redirect-error-10/#post-5489913)
 * You can use the “[enhanced text widget](https://wordpress.org/plugins/enhanced-text-widget/)”
   plugin to add a code in any sidebar that lets you properly redirect the browser
   to the secure version of your site (https), because do the way you do, generates
   precisely that loop which you are suffering. The code is shown below:
 *     ```
       <?php
        functiontosendhttps();
        function functiontosendhttps(){
        ?><script type="text/javascript">
         if(location.href.indexOf('https:')==-1) location.href=location.href.replace('http:','https:');
        </script><?php
        }
       ?>
       ```
   
 * If you use your own plugin to add code to WP, you can use the following code (
   which in fact is the correct way to do it)
 *     ```
       add_action('wp_head','functiontosendhttps',1);
        function functiontosendhttps(){
        ?><script type="text/javascript">
         if(location.href.indexOf('https:')==-1) location.href=location.href.replace('http:','https:');
        </script><?php
        }
       ```
   
 * To solve the redirection loop, you can run the following SQL query on the database
   that manages your WP installation
 * > I tried to put the code as is, however, the site modifies it, preventing it
   > from place properly, so I put it in Base64, to see it properly, simply drag
   > it to the address bar or a new tab.
 * `data:text/plain;base64,VVBEQVRFIGBwcmVmaXhfb3B0aW9uc2AgU0VUDQpgb3B0aW9uX3ZhbHVlYCA9ICdodHRwOi8vd3d3LmZveGFuZGhhcmUubmV0Jw0KV0hFUkUgKChgb3B0aW9uX25hbWVgID0gJ3NpdGV1cmwnKSBPUiAoYG9wdGlvbl9uYW1lYCA9ICdob21lJykpOw
   ==`
    In this example, the installation prefix is “prefix_” and obviously you 
   must change it according to your installation. I hope it works for you, greetings
 *  [zaidapicazo](https://wordpress.org/support/users/zaidapicazogmailcom/)
 * (@zaidapicazogmailcom)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/redirect-error-10/#post-5490106)
 * Hello, thanks four your support.
 * I’ve got the same issue, I can’t use the plugin because when I set ssl in pages
   secure it goes to a redirect error.
    I tried the code you said before in functions.
   php `add_action(‘wp_head’,’functiontosendhttps’,1); function functiontosendhttps(){?
   ><script type=”text/javascript”> if(location.href.indexOf(‘https:’)==-1) location.
   href=location.href.replace(‘http:’,’https:’); </script><?php }` But it is even
   worse, the website is completely wrong, not reading many files (css…) and the
   code is changing all the time online. Very strange.
 * As well, could you explain me about the database check? Thanks!
 * I have it contracted with the hosting people but I don’t know why I can’t set
   https and anything I do it redirects to a loop error.
 * Could you help me?
    Thanks in advance Best, Zaida

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

The topic ‘Redirect Error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-https_bec2c9.svg)
 * [WordPress HTTPS (SSL)](https://wordpress.org/plugins/wordpress-https/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-https/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-https/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-https/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-https/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-https/reviews/)

## Tags

 * [redirect error](https://wordpress.org/support/topic-tag/redirect-error/)

 * 2 replies
 * 3 participants
 * Last reply from: [zaidapicazo](https://wordpress.org/support/users/zaidapicazogmailcom/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/redirect-error-10/#post-5490106)
 * Status: not resolved