MozillaZine

should i use 301 redirect

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
KevinJoan
 
Posts: 1
Joined: June 11th, 2015, 2:02 am

Post Posted June 11th, 2015, 2:05 am

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. For your information, I'm using Hostforlife.eu hosting service. Their support told me to use the following lines on my .htaccess file:

Code: Select all
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:
Code: Select all
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!

jscher2000

User avatar
 
Posts: 10077
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted June 11th, 2015, 2:26 pm

The codes mean:

301 = permanently moved
302 = temporarily moved

If you want search engines to re-index under the HTTPS addresses, use 301. Otherwise, I'm not aware of any difference.

Return to Web Development / Standards Evangelism


Who is online

Users browsing this forum: No registered users and 2 guests