Question

How Can I Redirect 1 Https Domain To Another Https Domain

Posted September 13, 2017 1.6k views
NginxUbuntuApacheServer Optimization

Hello everyone, Few days back i redirected my 1 Https domain to another new Https one for example

https://example.com to https://bmerk.com, The domain http://example.com was redirecting fine without the SSL https but when i would browse the old domain on https:// i wasnt redirecting to the new one, Can anyone help me out how this works? I am on Ubuntu using VestapCP.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hello, @Zulqarnainkhan

At the moment you do not have a http to https redirection for your domain, meaning it will redirect only the https version to the other domain name.

In order to force your site to always load with https you can use the following rule in the .htaccess file:

#Force SSL
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

Another rule you can use to redirect all the traffic from https://example.com to https://bmerk.com is using a rule like this one in your .htaccess file:

Redirect 301 / https://bmerk.com

Hope this helps

Regards,
Alex

Submit an Answer