SEO MotionZ Forum
How to redirect site from http to https? - Printable Version

+- SEO MotionZ Forum (https://seomotionz.com)
+-- Forum: Search Engine Optimization (https://seomotionz.com/forumdisplay.php?fid=7)
+--- Forum: SEO General (https://seomotionz.com/forumdisplay.php?fid=22)
+--- Thread: How to redirect site from http to https? (/showthread.php?tid=5447)



How to redirect site from http to https? - swatijain2233 - 05-14-2019

Hello friends,

 I Have face A problem In My Website , Please tell me, How to redirect site from http to https?


RE: How to redirect site from http to https? - lata21 - 05-14-2019

You have to put the redirect code in your .htaccess file in order to make it happen. I don't know the code but surely someone in this forum will help you out.


RE: How to redirect site from http to https? - supaul - 05-14-2019

Use this if you are using apache.

Code:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]



RE: How to redirect site from http to https? - lata21 - 05-14-2019

Can you also provide me the code for www to non-www redirects?


RE: How to redirect site from http to https? - mgob - 05-15-2019

I am also looking for a redirect code that can redirect one of my sub-domain to main domain.


RE: How to redirect site from http to https? - supaul - 05-15-2019

You guys are worrying too much. The guys who are trying to do a redirect from a sub-domain to main domain or vice versa. To those people I say that if you are using cPanel in your hosting plan then check its Main Control Panel. It provides all the options of doing these type of redirects without even touching the .htaccess file. And those people who doesn't have a choice and have to use the .htaccess file, to them I will refer this post. https://serverguy.com/servers/redirect-http-to-https/ I hope this helps you.

Note:- The linked post is a promotional article of the hosted site.


RE: How to redirect site from http to https? - Mangat Singh Dhiman - 05-17-2019

Hi,
Log in to Cloud Flare and select the site.
Go to Page Rules.
Click “Create Page Rule”
Enter the URL
Click “Add a Setting” and select “Always Use HTTPS” from the drop-down.


RE: How to redirect site from http to https? - supaul - 05-17-2019

(05-17-2019, 06:33 AM)Mangat Singh Dhiman Wrote: Hi,
Log in to Cloud Flare and select the site.
Go to Page Rules.
Click “Create Page Rule”
Enter the URL
Click “Add a Setting” and select “Always Use HTTPS” from the drop-down.

Good God !!! man.

Did you just assume that the OP is using Cloudflare?? Tongue