Domain redirect in .htaccess causing SSL “Your connection is not private,” but works OK on non-https://

I’ve been banging my head trying to resolve this. Here is the problem and what I’ve done so far:

(1) I have domain: domain-one.com

(2) domain-one.com forwards to domain-two.com by .htaccess code below

############################

Redirect To Other Domain

############################

Options +SymLinksIfOwnerMatch

RewriteEngine on

RewriteRule (.*) http://www.domain-two.com/$1 [R=301,L]

(3) When attempting to access http://domain-one.com all is OK, forwards properly to domain-two.com, but

(4) When attempting to access https://domain-one.com, I receive SSL error “Your connection is not private” (this is Chrome’s message)

The main problem I am facing is how can the https:// also forward from domain-one.com to domain-two.com without causing the “Your connection is not private.” invalid SSL issue.

(5) Here is a breakdown of what is working and what is not with the .htaccess forwarder:

5.a FAIL: https://www.domain-one.com/ -> domain-two.com, “Your connection is not private.”

5.b FAIL: https://domain-one.com/ -> domain-two.com, “Your connection is not private.”

5.c PASS: http://www.domain-one.com/ -> domain-two.com

5.c PASS: http://domain-one.com/ -> domain-two.com

Excuse me for my ignorance and confusion on this. Thank you in advance for any tips on this problem. I am happy to provide any further clarifications needed, but I was trying to keep the post short.

Answer

I solved the problem, and wanted to clarify a few points:

(1) digijay, I own both domain names, and have access to them on the domain host. The domain host is separate from the hosting/email server, that is why we are needing to use this redirect to stall the production of an email migration.

(2) Michael Hampton, thank you for the tip. I was able to enable Let’s Encrypt on the domain-one.com account, and the redirect now works when accessing https://domain-one.com, no security errors.

Let’s Encrypt was the solution.

Attribution
Source : Link , Question Author : OldWest , Answer Author : OldWest

Leave a Comment