Configure CNAMEs for SendGrid, how to?

January 24, 2016 1.6k views
Linux Basics Configuration Management Email Ubuntu

Hello, I'm almost a complete noob at this.

I followd Discrouse's install instructions and created an account on SendGrid to serve as a mail server for Discourse. However, I seem to cannot validate the domain (whitelabeling) that I added on the SendGrid account. It seems that I don't know how to add the CNAME records for my droplet's domain, because I'm getting the following message:

Error validating domain:
Expected CNAME for "mail.medaddon.com" to match "u2210027.wl.sendgrid.net".
Expected CNAME for "s1.domainkey.medaddon.com" to match "s1.domainkey.u2210027.wl.sendgrid.net".
Expected CNAME for "s2.
domainkey.medaddon.com" to match "s2.domainkey.u2210027.wl.sendgrid.net".

I hope it's still propagating.

Can somebody help, please? :D

  • hey :)
    did it work for you ?

  • You need to put a dot in the end of alias.


    s1.domainkey -> s1.domainkey.u2210027.wl.sendgrid.net. < it's necessary this last dot


3 Answers


In your do admin panel go to Network > Domains > yourdomain.com

Then, create the following cnames:

Source Target
mail u2210027.wl.sendgrid.net.
s1.domainkey s1.domainkey.u2210027.wl.sendgrid.net.
s2.domainkey s2.domainkey.u2210027.wl.sendgrid.net

Notice two things:

  1. In the source don't put the whole domain aka mail.yourdomain.com; just the subdomain aka mail
  2. In the target append a dot

Hey there,

Thank you for reaching out to us!

You'd want to add the CNAME records here.

If you have a problem with adding the CNAME records or would like support to double check the records for you, reach out to us with a support ticket.

Happy coding,

Jon Schwenn
Platform Support Specialist

SendGrid shows you something like

s1.domainkey.yourdomain.com s1.domainkey.u1XXXXXX.wXXXX.sendgrid.net

in DigitalOcean when adding a CNAME.. drop the yourdomain.com from the first value

so enter

s1.domainkey -> s1.domainkey.u....

when you see the setup after saving.. you will see something like

s2._domainkey.yourdomain.com. 1800 IN CNAME s2.domainkey.u1XXXXXX.wXXXX.sendgrid.net.

or something.. then validation should happen fairly quick

  • Hi Jesse,

    Followed your instructions and got two CNAMEs verified but it doesn't seem to be verifying the 1st one
    -> www.yourdomain.com ->u1XXXXXX.wXXXX

    I have implemented it in the same way www -> u1XXXXXX.wXXXX

    Any idea how I can get this done?

Have another answer? Share your knowledge.