Having an SSL certificate is only the first step. If your website still accepts connections over http://, visitors can reach the unprotected version. An HTTPS redirect automatically sends all traffic to the encrypted (https) version of your website.
Why does an HTTPS redirect matter? #
- Security — all data between visitors and the server is encrypted
- SEO — Google prefers HTTPS websites and ranks them higher
- Trust — visitors see the padlock icon and know the connection is secure
- Avoiding duplicate content — without a redirect, Google sees http:// and https:// as two different websites
Method 1: HTTPS redirect via cPanel #
The simplest way, with no code to touch:
- Log in to cPanel
- In the Domains section, click Domains
- Find your domain in the list
- Turn on the Force HTTPS Redirect switch (set it to ON)
That's it! cPanel will automatically redirect all HTTP traffic to HTTPS.
Method 2: Redirect via .htaccess #
If your cPanel doesn't have the Force HTTPS option, you can add the redirect to the .htaccess file manually:
- In cPanel, open File Manager
- Go to the public_html folder
- Find the
.htaccessfile (if you can't see it, turn on Show Hidden Files in Settings) - Right-click it → Edit
- Add this at the very beginning of the file:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]- Click Save Changes
Method 3: HTTPS redirect in WordPress #
If you use WordPress, also check the following:
- Go to Settings → General
- Make sure both fields start with
https://:- WordPress Address (URL):
https://vasadomena.hr - Site Address (URL):
https://vasadomena.hr
- WordPress Address (URL):
- Save the changes
If these fields are set to http://, WordPress will generate links without SSL even when you have the .htaccess redirect in place.
Checking it works #
Once the redirect is set up, check the following:
- Open
http://vasadomena.hr— you should be redirected tohttps://automatically - Also check
http://www.vasadomena.hr— this must redirect too - Use httpstatus.io to confirm the 301 redirect
Common problems #
- Redirect loop ("Too many redirects") — this can happen if cPanel and .htaccess both force the redirect at the same time. Use only one method.
- Mixed content — the page loads over HTTPS, but some images or scripts still use HTTP. Change all links to https:// or use relative paths.
- The website doesn't load — check whether you actually have an active SSL certificate. Without one, the HTTPS redirect will show an error.
Need help setting it up? Email us at info@wmd.hr and we'll sort it out for you.