Cloudflare - Redirect DomainA to DomainB SSL Issue

Viewed 397

we have two domains, A and B, where I'm looking to get DomainA to redirect all requests to DomainB. There is no server behind DomainA. I've followed this tutorial exactly as presented on Cloudflare:

https://community.cloudflare.com/t/redirecting-one-domain-to-another/81960

And it works just fine for non-https traffic. Attempting to go to https://domaina.com gives me NET::ERR_CERT_COMMON_NAME_INVALID while http://domaina.com redirects to https://domainb.com just fine.

My page rules reflect the tutorial - that is *domaina.com/* 301 redirects to https://domainb.com/$2

My SSL options in Cloudflare is set to "Full". The orange clouds are on as well for both @ and www on DomainA which currently are A records. I've tried CNAME as well. Has anyone else run into this before? What might I be doing wrong?

2 Answers

Try setting your SSL option to "Flexible" instead. Since your domain A doesn't have SSL setup, "Full" wouldn't work as it requires SSL on the origin server as well.

Free Clouflare plan will give you "Free certificate".
The Free Certificate's Common Name is always pointed to sni.cloudflaressl.com.
You can't change the common name unless you order Advanced Certificate Manager for $10/month.

You can see Advanced Certificate Manager in SSL > Edge Certificates > Order Advanced Certificate:

Advanced Certificate Manager in SSL/TLS > Edge Certificates > Order Advanced Certificate

Sample "Free Certificate":

SSL sample

The certificate's common name is set to sni.cloudflaressl.com but it is valid to all major OS and browser because the Subject Alternative Name (SAN) in the certificate contains your domain.

Related