Question

nginx cname redirect to other site setup

Posted October 19, 2016 2.7k views
DigitalOcean

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 “service.mydomain.com” to affiliate.com. The Affiliate provider supports URL masking, and based on their tutorial I need to add a CNAME record (name,value ) as (service, cname.affilate.com). 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.

Regards

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

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.

Submit an Answer