X
X
X
X
0 850 532 0 917

Redirecting www Address to https:// with .htaccess File

Using an .htaccess file, you can include the following instructions to direct visitors of a website to the https protocol with the www prefix:

RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.example.com%{REQUEST_URI} [L,R=301]


Add this piece of code to the top of your .htaccess file. Replace example.com with your own domain name. These rules redirect users to https instead of http with the www prefix.

Can't find the information you are looking for?

Create a Support Ticket
Did you find it useful?
(41 times viewed / 0 people found it helpful)

Produces incredible But Geniune Solutions

Vipservis Web Hosting

Top