Sunday, April 11, 2021

Sunday, April 11, 2021 11:42:28 PM

About | Contact | Advertise With US

Nepal Online PatrikaBlogsRedirect HTTP TO HTTPS Forcely for SSL Certificates

Redirect HTTP TO HTTPS Forcely for SSL Certificates

Published:

I have reached here for searching How To Redirect Http to Https forcefully for SSL Certificates. In 2021 SSL certification is provided by almost all hosting providers but we may face some errors during our blogging journey. So We need to know How to Redirect Htttp to Https editing .htaccess file in Our Cpanel provide by the Hosting Company.

Step by Step Process to Forcing HTTP to HTTPS

For Processing forward you must have Cpanel access without it we cannot move ahead.
1. Login To Your Cpanel.
2. Go to File Manager.
3. Go to Public_html.

cPanel settings
cPanel settings

Step 4: As Shown in the above image click on Setting Icon.

show hidden files
show hidden files

5. Select Show Hiden File.
6. Click On Save.
7. Now You Will Find .htaccess File in Public_html Folder.
8. Right-Click .htaccess file and Edit.
9. Copy the below code and paste it into the .htaccess File.

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

update htaccess
update htaccess

10. Now Save Changes.
Now Refresh Your Site. You Will See Lock Sign. As Below:

Before SSL Certificate

No SSL Certificate found before editing the .htaccess file.

redirect http to https
redirect http to https

After SSL Certificate

redirect http to https
redirect http to https

Conclusion:

If you have any queries related to how to redirect HTTP to HTTPS for SSL certificate forcefully editing .htaccess file then you can comment below. I hope I help you to get your problem solution.

RELATED POST

REVIEWS

TECHNEWS

OFFERS

Price in Nepal

Copy link
Powered by Social Snap