Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Setting Up SPF and DKIM for SendGrid on Your NS1-Hosted Zone

DZone's Guide to

Setting Up SPF and DKIM for SendGrid on Your NS1-Hosted Zone

Leveraging some provider to handle the bulk and transactional mail from your website or application is paramount to your long-term success and reputation.

· Integration Zone
Free Resource

Learn how API management supports better integration in Achieving Enterprise Agility with Microservices and API Management, brought to you in partnership with 3scale

Email deliverability is a key metric that must be held in the highest regard when it comes to e-commerce and customer satisfaction. We all know the feeling of placing an order online and not receiving a confirmation email immediately. Doubt sets in and we wonder, “Did my order actually go through?” That’s why leveraging a provider like SendGrid to handle the bulk and transactional mail from your website or application is paramount to your long-term success and reputation.

For businesses on the internet who send transactional mail, it has been a challenge to confirm delivery of email to their users. One of the culprits is bad actors, such as spammers, who have been using mass mailing tactics, resulting in a clamp-down on how mail is classified as legitimate or junk.

Because of this, the Sender Protection Framework (SPF) was implemented. This involved setting up a text record on the apex of the zone that would be sending mail and referencing the permitted domains that send the mail on behalf of that zone’s name.

Then came DKIM, or Domain Key Identified Mail. DKIM introduced an even more stringent authentication schema at the expense of a large DNS record that teetered on the boundaries of what UDP could transmit effectively.

Thankfully, our friends over at SendGrid have removed a lot of the mechanics from this and made it super easy to send bulk and transactional mail. This article will go over the basic steps needed to get a zone ready for optimum deliverability.

Getting Your Domain Set Up With SendGrid

Log into your SendGrid account. If you haven’t created one, go ahead and do that now. Once you’re in, click on Settings on the left-hand side of the screen. Additional options will appear; select Whitelabels.

Click the Add Domain button to begin the process of creating SPF and DKIM for your domain.

Image title

In the subdomain field, define a new label that you’ll create in NS1’s portal in a later step. For this example, and in keeping with best practices around host naming, we’re calling this mail. In the domain field, enter the name of the zone you’re setting the whitelabel up for. It’s best to leave the Automated Security turned on, as SendGrid will optimize the SPF and DKIM records behind a CNAME for better deliverability.

Image title


Confirm the changes. Your DNS propagation will take a lot less time with NS1, so this warning is for some of those other DNS providers that take a dog’s age to push things to the edge.

Image title

A screen will appear with all of the pertinent information that you’ll need to create some new records in your NS1 portal.

Image title

Setting Up the DNS Records

With the information provided by SendGrid, you’re ready to create three new CNAME records in your zone. Log into the NS1 portal and locate the zone you want to send mail with.

Click Add Record.

Image title

Reference the list of records that SendGrid provided. Create the requisite CNAME records; changes will be saved as the records are created.Image title

Check that all of the records have been created and proceed to verification.

Image title

Verification

Log back into SendGrid’s portal. Click Settings and then Whitelabels.

The screen will indicate whether or not the DNS settings have been verified. If the screen indicates success under the VALID column, you’re good to go. If not, review your changes in the NS1 portal. If those are good, there’s likely a negative caching situation on the part of SendGrid, and the changes will be reflected in short order.

In a world of Snapchat and Instagram, consumers still rely heavily on email and, therefore, so must online merchants. A few bad apples have made it harder to effectively reach customers and prospects, but SendGrid has created a hassle-free way for companies to send the emails that are important to their business.

Unleash the power of your APIs with future-proof API management - Create your account and start your free trial today, brought to you in partnership with 3scale.

Topics:
spf ,dkim ,sendgrid ,integration ,ns1

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}