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:

  1. Log in to cPanel
  2. In the Domains section, click Domains
  3. Find your domain in the list
  4. 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:

  1. In cPanel, open File Manager
  2. Go to the public_html folder
  3. Find the .htaccess file (if you can't see it, turn on Show Hidden Files in Settings)
  4. Right-click it → Edit
  5. Add this at the very beginning of the file:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  1. Click Save Changes

Method 3: HTTPS redirect in WordPress #

If you use WordPress, also check the following:

  1. Go to Settings → General
  2. Make sure both fields start with https://:
    • WordPress Address (URL): https://vasadomena.hr
    • Site Address (URL): https://vasadomena.hr
  3. 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 to https:// 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.