How to Force Redirect All Traffic of a Domain to SSL

All websites on Ovation Hall Servers are fully secured with an SSL certificate, for free. There are no additional charges involved. This is part of our commitment to provide a secure web experience for our customers and our customers’ customers. This article is to guide you on how to force redirect all traffic to SSL or HTTPS.

Sometimes, having an SSL certificate is not enough. Having all your website traffic redirected to the SSL version of your site is very crucial to eradicate any security vulnerabilities. In this article, we show you how to redirect all traffic of your domain to SSL (HTTPS).

Let us dive in:

How to Redirect all Traffic to SSL (HTTPS)

Most of the time, for WordPress sites, changing the WordPress Address (URL), and Site Address (URL) in your WordPress dashboard to https://yourdomain.com or https://www.yourdomain.com depending on how you want it would fix your SSL issue. If it doesn’t, follow the steps below:

  1. Log into your account’s CPanel. Your cPanel is usually found by typing your domain name, then forward slash cPanel. For instance, if your domain is apple.com, your CPanel would be at apple.com/cpanel. 
  2. Click to open File Manager in the menu after logging in.
  3. Click to open the folder of the website you want to manage. That is if the website is an addon domain in the CPanel. If not, click to open the Public HTML folder.
  4. Look for a file named .htaccess, and Click to edit it.
  5. Add the lines of code below to the .htaccess codes. For WordPress sites, put the code before the part that says # END WordPress.
    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80 
    RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]
  6. Replace the yourdomain.com with your own website domain name, and Click Save at the top right corner of the page.
  7. Visit your website again in your browser and see the changes take effect.
  8. For subdomains, use the code below:
    RewriteCond %{HTTPS} !=on
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

After following the steps above, your site should show a secure connection such as the one below:

force redirect all traffic to ssl

That is all. This should help fix your https issue. If not, please submit a ticket in your client area and we would check to fix it for you. If you need help on how to start using your Ovation Hall account, read our Getting Started Guide. Check out from this link why you need to have an SSL certificate for your website.

Was this article helpful?

Related Articles

1 Comment

  1. Obeng bright

    Thank you very much. You’ve really helped a lot

Leave A Comment?