How to force SSL certificate for your website?

Опубликовано: 03 Июль 2026
на канале: Babal Host
834
16

SSL certificate is automatically installed on all the hosted websites with us. The pre-condition would be that the domain need to be pointing to our nameservers or server IP without any proxy. If you have recently taken the hosting account with us and/or have just updated the nameservers, the DNS resolution process can take upto 72 hours (most of the times the DNS resolution should complete within the first 24 hours)

Once the DNS fully resolves, our automated system would try to install SSL for your website. These processes run every 30-60 minutes and might require additional 24 hours from the time of DNS resolution to be installed.

Links Used

Whynopadlock (to see why the website do not have padlock, secured mark): https://www.whynopadlock.com/

Code used to force SSL

```
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]
```