Question

SendGrid "Link Branding" Custom SSL with Nginx

Posted November 26, 2020 943 views
NginxNode.jsDNSDigitalOcean Droplets

Hey Everyone,

There’s this problem I ran into, and can’t figure out how to solve it.

I signed up for SendGrid and got my domain authorized/verified and also enabled “Link Branding”.
Now according to SendGrid, I added their CNAME(s) to my domain’s DNS manager.

url123.mydomain.com -> sendgrid.net.
url45678.mydomain.com -> sendgrid.net.
....
....
....

I am running a Node.js app which is now able to send mails through SendGrid and it runs flawlessly but I can’t open the links that are provided in the mail. (It shows the connection to this site is not secure, also the SSL certificate on that URL is not verified).

The server that I am using for this project won’t open any HTTP link, it redirects all HTTP traffic to HTTPS. (This can be a possible reason for the problem I’m facing).

Also, I tried to set CNAME(s) like:

url123.mydomain.com -> @ (pointing to A record for mydomain.com)

and then using Nginx to forward the url123 traffic to sendgrid.com, but that too wasn’t working because I already have a CNAME(www) pointing to @ (A record of mydomain.com).

P.S. Adding SSL is also not an option due to the above CNAME conflict.

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.

×
Submit an Answer
1 answer

Hi there @bhupenpal,

I don’t think that this would work that way. As when you add the CNAME records, they need to be pointed to the SendGrid domain name, this is how they verify the records.

And as the CNAME records are pointing to SendGrid, this means that the traffic for those subdomains would never reach your server as they will route to SendGrid directly.

Here is a step by step video on how to set that up:

https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/

I believe that the main reason why they make you point your branded domain to their own site is so that you could still use their analytics features.

Regards,
Bobby