Title: Redirecting http to https
Last modified: January 12, 2020

---

# Redirecting http to https

 *  [Meerja Maqbul Baig](https://wordpress.org/support/users/indianresults/)
 * (@indianresults)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/redirecting-http-to-https/)
 * Hello, I just migrated my website to digital ocean hosting. Now the site is working
   properly, but there is an error. The site is opening with https and without Http
   also. Only the home page gets redirects to the https version. some posts not 
   redirecting.
    You can check this link with and without https [http://example.com/west-bengal-lottery-dear-bangasree-damodar-result](http://example.com/west-bengal-lottery-dear-bangasree-damodar-result)
   [https://example.com/west-bengal-lottery-dear-bangasree-damodar-result](https://example.com/west-bengal-lottery-dear-bangasree-damodar-result)
   In the above “Http” version, I check source code of the page and found some URLs
   are “[http://example.com/xmlrpc.php&#8221](http://example.com/xmlrpc.php&#8221);
   like this present without SSL. some of the **wp-content** and **wp-includes**
   URLs are HTTP. So, how to fix this error. Please suggest to me.
    -  This topic was modified 6 years, 2 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
    -  This topic was modified 6 years, 2 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
    -  This topic was modified 6 years, 2 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fredirecting-http-to-https%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [6 years, 2 months ago](https://wordpress.org/support/topic/redirecting-http-to-https/#post-12316984)
 * Add this to the top of your site’s .htaccess file:
 *     ```
       RewriteEngine On
       RewriteCond %{HTTPS} !=on
       RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] 
       ```
   
 * Also, install the plugin “better search replace. Search for `http://example.com`
   and replace with `https://example.com` in all tables.
    -  This reply was modified 6 years, 2 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).

Viewing 1 replies (of 1 total)

The topic ‘Redirecting http to https’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/redirecting-http-to-https/#post-12316984)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
