New Website with SSL. Do I need 301 Redirect in htaccess?

Author Topic: New Website with SSL. Do I need 301 Redirect in htaccess?  (Read 687 times)

Offline nqservicesTopic starter

  • Trade Count: (0)
  • Newbie
  • *
  • Thank You 0
  • Posts: 1
  • Karma: 0
Hi,

My current website url is: http://www.example.com and I will release a completely new website that will use a SSL Certificate and because it’s a full new website all the url’s will be new and different from the “old” website.

My hosting company support told me to use the following lines on my .htaccess file:

----
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
----

But when researching for this on google, I have found many websites telling that we should always use a 301 redirect and to do that the .htaccess file should be:

----
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
----

So in order to resume, it’s the same domain, but now with a SSL Certificate and a full new website. In this case do I need to use the 301 redirect on my .htaccess file?

Thanks


 

Related Topics

  Subject / Started by Replies Last post
0 Replies
1230 Views
Last post 12-13-2013, 12:37:34
by jpf566
2 Replies
1532 Views
Last post 12-04-2014, 02:47:16
by Stephen
6 Replies
2510 Views
Last post 08-30-2016, 00:24:05
by NFSC
2 Replies
1549 Views
Last post 10-30-2016, 00:38:44
by NamRay
0 Replies
795 Views
Last post 11-22-2016, 04:51:01
by mahisharma2