Email Deliverability

DKIM: How It Works And How To Set It Up

14th Nov, 2022 — 5 min read

Email marketing is a great way to reach out to your customers and promote your products or services. However, your emails need to be delivered in order to be effective. This is where DKIM comes in. In this article, we will take a look at how DKIM works and how you can set it up for your domain.

Email marketing is a great way to reach out to your customers and promote your products or services. However, your emails need to be delivered in order to be effective. This is where DKIM comes in.

DKIM stands for DomainKeys Identified Mail. It is an email authentication system that uses digital signatures to verify that an email message has not been tampered with during transit.

When you set up DKIM for your domain, you are essentially telling recipients that your emails can be trusted and that they can be sure that the content of your messages has not been changed.

This is important because it can help to improve your email deliverability and prevent your messages from being marked as spam.

In this article, we will take a look at how DKIM works and how you can set it up for your domain.

How DKIM works?

When an email is sent, it goes through a number of different servers before it reaches the recipient's inbox.

Each server that the email passes through can potentially make changes to the message. For example, a server might add a new header field or change the body of the message.

When these changes are made, the message is said to be "mutated". This can potentially cause problems because the message that the recipient sees might be different from the message that was originally sent.

This is where DKIM comes in.

When you set up DKIM for your domain, you create a digital signature for your emails. This signature is added to the headers of your messages.

When the message is received by the recipient, their server can use the signature to verify that the message has not been mutated during transit.

If the signature is valid, then the recipient can be sure that the message they are seeing is exactly the same as the message that was originally sent.

How to setup DKIM?

Setting up DKIM is a relatively simple process.

First, you will need to generate a public/private key pair. This can be done using a tool like OpenSSL.

Once you have your key pair, you will need to add a TXT record to your DNS settings. This record will contain your public key.

Once you have added the TXT record, you will need to configure your email server to add the DKIM signature to outgoing messages.

The exact process will vary depending on your email server, but most servers will have some kind ofDKIM plugin that you can use.

Why DKIM is important

DKIM is important because it helps to improve your email deliverability.

When you set up DKIM, you are essentially telling recipients that your emails can be trusted. This can help to improve your sender reputation and make it more likely that your messages will be delivered to the recipient's inbox.

It is also important to note that many email providers now use DKIM to help filter spam.

If your messages are not signed with DKIM, then there is a chance that they will be marked as spam and never reach the intended recipient.

Example DKIM setup

To see how DKIM works, let's take a look at an example setup.

First, we need to generate a key pair. We can do this using OpenSSL:

openssl genrsa -out dkim_private.pem 2048

Once we have our key pair, we need to add a TXT record to our DNS settings. This record will contain our public key. The public key will be generated by using the private key:

openssl rsa -in dkim_private.pem -pubout -outform der 2>/dev/null | openssl base64 -A

Now, add a TXT record to your sender domain. If your sender domain is abc.com, the DNS record must be set as;

A domain can use multiple DKIM keys for different purposes. These usages are isolated by "selectors". Choose a selector and use it as a subdomain on your DNS setup:

[selector]._domainkey.abc.com TXT "v=DKIM1; p=[the_generated_public_key]"

The selector can be anything such as "marketing", "t1", etc.

Once we have added the TXT record, we need to configure our email server to add the DKIM signature to outgoing messages.

The exact process will vary depending on your email server, but most servers will have some kind of DKIM plugin that you can use.

Best Practices for DKIM

There are a few best practices that you should follow when setting up DKIM for your domain.

First, you should always use a strong key pair. The keys should be at least 2048 bits in length.

Second, you should rotate your keys on a regular basis. This means generating new keys and adding them to your DNS settings.

Third, you should sign all of the outgoing email from your domain. This includes messages sent from addresses such as "noreply@yourdomain.com" and "info@yourdomain.com".

Finally, you should make sure that you keep your DKIM private key secure. The key should never be stored in plain text on your server.

Conclusion

DKIM is a great way to improve your email deliverability and ensure that your messages are not marked as spam.

If you are sending email marketing campaigns, then you should definitely set up DKIM for your domain.

By following these best practices, you can be sure that your messages will be delivered safely and securely to the intended recipient.

You should not rely on DKIM alone, you should also set Sender Policy Framework (SPF) and BIMI settings for your sender domains.


Related Articles

Octeth On-Premise Email Marketing Software

Recent articles

We publish a few email marketing articles every week.

Email Marketing Tips

Create Attention-Grabbing Email Subject Lines: 5 Simple Tips

6 min read

I know it's difficult to stand out in a crowded inbox. That's why I'm here to share 5 simple tips to help you create attention-grabbing email subject lines. From keeping it short and descriptive to setting a sense of urgency, these tips can help you make your emails stand out from the rest. With these tips, you'll be able to create more effective subject lines and grab your reader's attention.

Email Deliverability

Blacklist Basics: How To Check Your Email Sender Domains And IP Addresses

9 min read

Email marketing is an effective way to reach potential customers. But, if your sender domain or IP address is blacklisted, it can hurt your delivery success rate. It's important to regularly check for blacklists. This article will explain what blacklisting is, the types of blacklists, how to scan for them, and what services to use. With this information, you can ensure your emails get to their destination without issue.

Email Marketing Tips

Email Headers 101: What They Are And Why They Matter

12 min read

Email headers may seem like a small, insignificant part of our daily correspondence, but they play a crucial role in the delivery and security of our messages. From routing messages to detecting spam, email headers are the unsung heroes of the digital world. In this article, we will explore the ins and outs of email headers, from what they are and what information they contain, to how they keep your inbox secure and how to access them on popular email clients. Don't let these overlooked details slip by any longer, read on to master the art of email headers.

Subscribe to our newsletter

The latest email marketing news, articles, and resources, sent to your inbox weekly.