How to enable free SSL by default (force https://)

Modified on Wed, 30 Mar 2022 at 11:32 PM

More and more websites switch to https:// in order to improve visibility on major search engines and site security. NYhost.net offers free, SSL (automatic renewals every 90-days) for any website - commercial or personal. It's good idea to secure your website today!

If you don't have valid SSL, please contact us with list of domain names and we will add https:// within 2 business days. If you do have valid SSL and wish to disable http:// (force https://), please add following lines to your .htaccess file located inside public_html folder:


RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
Header set Strict-Transport-Security "max-age=31536000" env=HTTPS


Please save .htaccess file inside public_html folder then try to access website without https://, for example: http://nyhost.net


Browser will instantly redirect all traffic to secure Apache port: https://nyhost.net

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article