Configure SSL/HTTPS in cPanel
What is SSL/HTTPS?
SSL (Secure Sockets Layer) and its successor TLS (Transport Layer Security) are security protocols that encrypt communication between the browser and server. HTTPS is HTTP over SSL/TLS, meaning data is transmitted securely and encrypted.
Using HTTPS is essential for:
- Protecting user data (passwords, personal information)
- Improving SEO (Google favors HTTPS sites)
- Building trust with visitors
- Meeting modern security standards
Method 1: Use Let's Encrypt (Free and Recommended)
1. Access cPanel
- Go to your cPanel panel
- Log in with your credentials
2. Go to SSL/TLS section
On the cPanel main page, look for the "Security" section and click on "SSL/TLS" or "SSL/TLS Status".
You can also search for it using the search box at the top of cPanel.
3. Install Let's Encrypt certificate
In the "SSL/TLS Certificates" section:
- Click "Manage SSL certificates"
- Look for the "Let's Encrypt Certificates" section
- Select the domain for which you want to install the certificate
- Select additional domains you want to include (www, subdomains, etc.)
- Click "Install"
cPanel will automatically install the Let's Encrypt certificate. This may take a few minutes.
4. Verify installation
After installation:
- Go back to "SSL/TLS Status"
- Verify the certificate is installed and active
- Try accessing your site with
https://yourdomain.com
Method 2: Install commercial SSL certificate
If you have a purchased SSL certificate:
- In cPanel, go to "SSL/TLS" > "Manage SSL certificates"
- Select the domain
- Paste the certificate in the "Certificate (CRT)" field
- Paste the private key in the "Private Key (KEY)" field
- If you have an intermediate certificate, paste it in "CA Bundle Certificate (CABUNDLE)"
- Click "Install Certificate"
Force HTTPS (HTTP to HTTPS redirect)
To make all visitors use HTTPS automatically:
Option 1: From cPanel
- In cPanel, search for "Redirects"
- Select type "Permanent (301)"
- In "https?://(www\.)?yourdomain.com", enter your domain
- In "https://yourdomain.com/$1", enter the URL with HTTPS
- Click "Add"
Option 2: Using .htaccess
- In cPanel, open "File Manager"
- Navigate to
public_html - Edit or create the
.htaccessfile - Add this code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Save the file.
Renew Let's Encrypt certificate
Let's Encrypt certificates expire every 90 days, but cPanel can renew them automatically:
- In "SSL/TLS Status", check the expiration date
- If it's close to expiring, click "Renew"
- Or configure automatic renewal if available
Note: In most cases, cPanel automatically renews Let's Encrypt certificates before they expire.
Verify certificate status
To verify your SSL certificate is working correctly:
- Access your site with
https://yourdomain.com - In the browser, verify the green lock appears
- Click on the lock to see certificate details
- Use online tools like SSL Labs for a complete analysis
Configure certificate for multiple domains
If you have multiple domains or subdomains:
- When installing Let's Encrypt, select all domains and subdomains you want to include
- Or install a wildcard certificate (if available) that covers all subdomains
Wildcard certificate: Covers all subdomains (e.g., *.yourdomain.com covers blog.yourdomain.com, shop.yourdomain.com, etc.)
Common problems
Error: "Certificate installation failed"
- Verify the domain is pointing correctly to the server
- Verify DNS records are configured
- Wait a few minutes and try again
Site shows "Not Secure" or warning
- Verify the certificate is installed correctly
- Verify you're accessing with
https://and nothttp:// - Clear browser cache
- Verify there's no mixed content (HTTP and HTTPS mixed)
Mixed content error
- Occurs when your HTTPS site loads resources (images, scripts) from HTTP
- Change all resource URLs to HTTPS
- Or use relative URLs instead of absolute
Certificate expired
- Renew the certificate from cPanel
- Verify automatic renewal is configured
Advanced configuration
Force HTTPS only for certain pages
In the .htaccess file, you can configure specific rules:
# Force HTTPS only for /admin
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} ^/admin
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Configure HSTS (HTTP Strict Transport Security)
To further improve security, add HSTS in .htaccess:
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
</IfModule>
Tips
- Use Let's Encrypt: It's free, automatic and reliable
- Configure automatic renewal: Make sure certificates renew automatically
- Force HTTPS: Configure HTTP to HTTPS redirect
- Verify regularly: Check your certificates status periodically
- Update WordPress/plugins: If using WordPress, update URLs in Settings > General
- Use wildcard certificates: If you have many subdomains, consider a wildcard certificate
Need help?
If you're having trouble configuring SSL/HTTPS in cPanel, open a ticket from the billing.baires.host panel or contact us for support.
You can also reach us through our social media:
- Instagram: @baires_host
- Discord (active support): https://discord.gg/dzjauatAFN
- Linktree: https://linktr.ee/baires.host