Redirect Website with HTTPS & WWW Easily

Lets learn how to Redirect Websites with HTTPS and WWW Easily.

Goto your Linux Web Hosting Panel.

Open File Manager in cPanel or DirectAdmin

Edit .htaccess file or Create a File with this name.

Then Copy below code and paste.

And

replace yourdomain.com with Your domain.

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

If RewriteEngine On this line already available on your .htaccess file, Then don’t, don’t add it twice.

That’s All. Done

If need any faster help comment here, I will reply asap.

Leave a Reply