0

I bought an SSL certificate for a website and followed the full installation procedure given by the vendor. It is now active and if I go to lets say https://website.com I get the desired result.

However, when someone tries http://website.com the request is not redirecting to https://website.com. I want that when someone enters website.com the request is automatically redirected to https://www.website.com.

I am using GoDaddy Linux server hosting. Please suggest what should I do to achieve what I want.

brezanac
  • 9,088
  • 4
  • 40
  • 58

1 Answers1

1

This is also including SEO 301 redirections. Tested and works fine:

Options +FollowSymlinks
RewriteEngine On
RewriteBase /

RewriteCond %{HTTPS} !^on$
RewriteRule (.*) https://www.site.co.uk/$1 [L,R=301]

RewriteCond %{HTTP_HOST} ^site.co.uk [NC]
RewriteRule ^(.*)$ https://www.site.co.uk/$1 [L,R=301]
Sipex
  • 119
  • 2
  • 4