Title: redirect non-www to www https
Last modified: July 11, 2019

---

# redirect non-www to www https

 *  [thetoolman123](https://wordpress.org/support/users/thetoolman123/)
 * (@thetoolman123)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/redirect-non-www-to-www-https/)
 * Hi,
 * I am trying to redirect a non-www version of my website to [https://www.website.com](https://www.website.com)
 * Currently it is set to [https://website.com](https://website.com) in my WP-admin
 * I have tried the following in my htaccess file which works:
 *     ```
       RewriteEngine On
       RewriteCond %{HTTP_HOST} ^www.website.co.uk$ [NC]
       RewriteRule ^(.*)$ https://www.website.co.uk/$1 [R=301,L]
   
       RewriteCond %{HTTPS} !^on$
       RewriteRule (.*) https://www.website.co.uk/$1 [R,L]
       ```
   
 * but I get this error when it redirects:
 * “The page isn’t redirecting properly
 * An error occurred during a connection to [http://www.website.co.uk](http://www.website.co.uk).
 * This problem can sometimes be caused by disabling or refusing to accept cookies.”
 * Can anyone tell me why this would be? Is it because the URL in my wp-admin is
   not using [http://www.?](http://www.?)
 * Thanks!

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

 *  [Davood Denavi](https://wordpress.org/support/users/binarywc/)
 * (@binarywc)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/redirect-non-www-to-www-https/#post-11723913)
 * The htaccess code for this could vary from provider to provider as it depends
   on the server configuration. I would suggest contacting your host and asking 
   them for their input on how to do this via htaccess. If you are not able to assist
   because they claim it is outside of their technical support terms try using this
   plugin: [https://wordpress.org/plugins/really-simple-ssl/](https://wordpress.org/plugins/really-simple-ssl/)
 * Hope this helps. Once you find a solution that you are happy with please tag 
   the thread as resolved.
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [6 years, 11 months ago](https://wordpress.org/support/topic/redirect-non-www-to-www-https/#post-11724008)
 * Moved to Fixing WordPress, this is not a Developing with WordPress topic.

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

The topic ‘redirect non-www to www https’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/redirect-non-www-to-www-https/#post-11724008)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
