HostSlim

How do I redirect my domain or force HTTPS?

Force HTTPS After activating SSL, add these lines at the top of the .htaccess file in your public_html folder: RewriteEngine On RewriteCond %{HTTPS} off…

  • Shared Hosting

Force HTTPS

After activating SSL, add these lines at the top of the .htaccess file in your public_html folder:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301]

Redirect to another domain

RewriteEngine On
RewriteRule ^(.*)$ https://www.newdomain.com/$1 [L,R=301]

A 301 redirect tells search engines the page has moved permanently, so your Google ranking is transferred to the new address. Many control panels also offer a Site Redirection option if you prefer not to edit files.

More from the knowledge base

Need something that is not on the list?

Custom builds, private VLANs, BGP sessions, multi-rack deployments. Tell us what you are running and an engineer replies, usually within the hour.