Redirect HTTP TO HTTPS Forcely for SSL Certificates

redirect http to https for ssl certificates

I have reached here for searching How To Redirect Http to Https forcefully for SSL Certificates. In 2020 ssl certificated is provided by almost all hosting provider but we may face some error during our blogging journey. So We need to know How to Redirect Htttp to Https editing .htaccess file in Our Cpanel provide by 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.

  • Step 1: Loging To Your Cpanel.
  • Step 2: Go to File Manager.
  • Step 3: Go to Public_html.
cPanel settings
  • Save
  • Step 4: As Shown in above image click in Setting Icon.
show hidden files
  • Save
  • Step 5: Select Show Hiden File.
  • Step 6: Click On Save.
  • Step 7: Now You Will Find .htaccess File in Public_html Folder.
  • Step 8: Right Click .htaccess file and Edit.
  • Step 9: Copy below code and Paste in .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
  • Save
  • Step 10: Now Save Changes.

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

redirect http to https
  • Save

Before SSL Certificate

No SSL Certificate found before editing .htaccess file.

  • Save

After SSL Certificate


If you have any queries related to how to redirect http to https for ssl certificate forcefully editing .htaccess file than you can comment below. I hope i help you to get your problem solution. 

Learn - Earn - Share

SEO Tips, Google Adsense, Hosting offers and Special Tips and Tricks To Grow Your Blogging Revenue.

I will never give away, trade or sell your email address. You can unsubscribe at any time.

Leave a Comment


Recent Posts
Share via
Copy link