Securing your website with HTTPS is essential in today’s digital landscape, especially when you’re hosting with a trusted provider like HosterSale. HTTPS encrypts the data transferred between your website and its visitors, ensuring protection against potential hackers, boosting SEO rankings, and building user trust. In this easy guide, we’ll walk you through how to force HTTPS on your website using cPanel and .htaccess. These methods are quick and effective for anyone running a site on HosterSale’s web hosting platform or any cPanel Hosting.
Why Force HTTPS on Your HosterSale Website?
Forcing HTTPS isn’t just about security—it’s also about improving your website’s overall performance. Google and other search engines prioritize secure websites in search results, giving a boost to sites that use HTTPS. Plus, browsers display a “Not Secure” warning for sites that don’t use HTTPS, which can drive potential customers away.
Let’s look at how you can implement this.
Step 1: Force HTTPS via cPanel (No technical expert required)
HosterSale’s cPanel makes it incredibly simple to force HTTPS with just a few clicks. This option is perfect for beginners who want to secure their website without any coding.
Here’s how:
- Log in to Your HosterSale cPanel.
- Visit
https://yourdomain.com/cpanel
and enter your cPanel account login credentials to access your hosting account’s control panel.
- Visit
- Find the ‘Domains’ Section.
- In your cPanel account, click on the ‘Domains’ section. This is where you manage your domain settings, including HTTPS redirection.
- Enable ‘Force HTTPS Redirect’ for Your Domain.
- Next to your domain, you’ll find an option labeled ‘Force HTTPS Redirect’. Toggle it on. This tells the server to automatically redirect all HTTP traffic to HTTPS, securing all data transfers between your site and its visitors.


- Check Your SSL Certificate.
- Make sure that your SSL certificate is active. Most of HosterSale’s hosting plans come with free SSL certificates via Let’s Encrypt, which you can install using the AutoSSL feature in cPanel. If SSL certificate is not installed, then click here to learn how to install SSL certificate.
Step 2: Force HTTPS via .htaccess for Advanced Control
If you prefer more control over your website settings, or if you’re comfortable editing configuration files, you can manually force HTTPS by adding a few lines of code to your .htaccess file. This method works on any site hosted on HosterSale’s web hosting services or cPanel Hosting, and ensures a 100% secure connection for your visitors.
Here’s how you can do it:


- Access Your .htaccess File.
- Log in to your File Manager via cPanel or use an FTP client to locate your
.htaccess
file in thepublic_html
directory. - If the file is hidden, click the option to “Show Hidden Files” in your File Manager.
- Access Your .htaccess File.
Log in to your File Manager via cPanel or use an FTP client to locate your.htaccess
file in thepublic_html
directory.
If the file is hidden, click the option to “Show Hidden Files” in your File Manager. - Add Redirect Code to Force HTTPS.
- Open the
.htaccess
file and add the following code at the top:
- Open the
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
This code forces all HTTP requests to be redirected to the secure HTTPS version of your website.
- Save Changes and Test.
- Save the
.htaccess
file and then test your site by enteringhttp://yourdomain.com
. It should automatically redirect tohttps://yourdomain.com
, ensuring all traffic is secure.
- Save the


Benefits of Forcing HTTPS of Your Website
- SEO Benefits: Google and other search engines favor secure websites, giving you an SEO advantage that can help your site rank higher.
- Enhanced Security: HTTPS encrypts data, protecting your visitors’ personal information, such as login credentials, credit card details, and other sensitive data.
- User Trust: When visitors see the padlock icon in their browser, they know your website is secure, which increases trust and can boost conversions.
- Compliance and Professionalism: Forcing HTTPS is crucial for compliance with PCI DSS (Payment Card Industry Data Security Standard) if you handle online payments. It also reflects a professional level of care in managing your website.
Why Use HosterSale for Your Website Hosting?
At HosterSale, we take your website’s security and performance seriously. With our hosting services, you’ll have access to free SSL certificates, easy-to-use cPanel tools, and fast, reliable servers that ensure your website is always secure and performs at its best. Whether you’re hosting a blog, e-commerce store, or business website, our hosting platform is designed to help you grow while keeping your data safe.
Final Thoughts
Forcing HTTPS is a must for any website, and with HosterSale, it’s easier than ever. Whether you use our quick cPanel solution or prefer the manual .htaccess
method, you can secure your site in just a few minutes. Not only will you protect your visitors, but you’ll also improve your search engine rankings and build a more trusted brand online.
Take the next step in securing your website today with HosterSale’s powerful and reliable hosting solutions. Keep your visitors safe, improve your SEO, and show the world you take online security seriously.