nginx cname redirect to other site setup

October 19, 2016 2.1k views

I have a website which uses an affiliate program. Also, I am using ssl certificate and nginx using let us encrypt. I need to redirect the subdomain "" to The Affiliate provider supports URL masking, and based on their tutorial I need to add a CNAME record (name,value ) as (service, Wen I have added this record I got an ssl certificate error because "service" subdomain does not have an ssl certificate. So I have removed the CNAME record and added an A record to expand ssl certificate. Then I tried to add cname record again, but CNAME record can not have the same name as an A record. my question is how o configure this using nginx, letus encrypt and CANME?. I am lost and I am not able to track how this should work.


1 Answer

It the affiliate program offers a CNAME based solution this would not be a redirect since redirection is not done by DNS, only aliasing. If you point a name to the name they provide and their server does not have an SSL certificate that supports your domain then this will happen. I would recommend reaching out to the provider to get more information on best-practices with their recommended configuration.

Have another answer? Share your knowledge.