Email Deliverability
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.
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.
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.
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.
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.
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.
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.
Recent articles
We publish a few email marketing articles every week.
Subscribe to our newsletter
The latest email marketing news, articles, and resources, sent to your inbox weekly.