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.
Join the DZone community and get the full member experience.
Join For FreeEmail 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.
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.
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.
A screen will appear with all of the pertinent information that you’ll need to create some new records in your NS1 portal.
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.
Reference the list of records that SendGrid provided. Create the requisite CNAME records; changes will be saved as the records are created.
Check that all of the records have been created and proceed to verification.
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.
Opinions expressed by DZone contributors are their own.
Trending
-
Building the World's Most Resilient To-Do List Application With Node.js, K8s, and Distributed SQL
-
Database Integration Tests With Spring Boot and Testcontainers
-
Knowing and Valuing Apache Kafka’s ISR (In-Sync Replicas)
-
How To Manage Vulnerabilities in Modern Cloud-Native Applications
Comments