Designing and hosting websites for clients is a fun and thrilling experience. However, sending emails and ensuring their delivery to the inbox rather than the spam folder can be a challenge.
The need to implement stricter security protocols to prevent malicious actors from sending emails on your behalf has made the once simple email setup process more complex and demanding.
Mail Tester is a valuable website resource that enables you to assess the spammy-ness of your emails. With its user-friendly interface, you can easily copy your email content onto the Mail Tester homepage, and then send it through your email application or website’s contact form as a resend.
After sending the email, simply check your score to see how it measures up. The app provides an overall score, as well as specific recommendations for improving it. This way, you can ensure that your emails are effectively reaching your intended audience, and are not being flagged as spam.

When you check your Mail Tester results, you may find that your email score is lower than you expected, particularly with regards to DKIM and DMARC.
By following these simple tips, you’ll soon be sending emails that are not only engaging, but also less likely to be marked as spam.
Here are the tools you’ll need access to:
- Mail Tester https://www.mail-tester.com/
- Access to your DNS. This will be your domain registrar or your hosting account; wherever your nameservers are.
- cPanel
First, what is DMARC and DKIM and how to generate the proper settings?
DMARC (Domain-based Message Authentication, Reporting & Conformance) and DKIM (DomainKeys Identified Mail) are email authentication protocols used to help protect email senders and receivers from email spoofing.
DMARC is a policy that allows a sender’s domain to publish a statement to specify which mechanisms (e.g., SPF and DKIM) are used to authenticate email messages sent from that domain and how to handle failed authentication attempts. It allows a recipient’s email server to check the authenticity of an incoming message and take appropriate action (e.g., reject, quarantine, or accept the message) based on the DMARC policy published by the message’s sender’s domain.
DKIM, on the other hand, is a way for an email’s receiving server to verify that the email was actually sent by the domain it claims to be sent from, and that the content of the email hasn’t been modified during transit. This is done by adding a digital signature to the email header, which can be verified by the recipient’s email server using the public key published in the sending domain’s DKIM record.
To generate proper DMARC and DKIM settings, you’ll need to perform the following steps:
- Generate a private/public key pair for your domain using a tool such as OpenSSL.
- Publish the public key in a DKIM TXT record in your domain’s DNS. This record should include the selector used to sign the messages, the domain being signed, and the public key.
- Sign your outgoing email messages with the private key.
- Create a DMARC TXT record in your domain’s DNS, specifying your DMARC policy. This record should specify which email authentication mechanisms (e.g., SPF and DKIM) you are using to protect your domain, and what actions should be taken if a message fails authentication.
- Test your DMARC and DKIM settings using a tool such as DMARC Analyzer to ensure that your messages are being properly authenticated and that your DMARC policy is being followed by email receivers.
Note: The specific steps to generate DMARC and DKIM settings may vary depending on the tools and email infrastructure you’re using, so it’s a good idea to consult the documentation for those tools for more specific instructions.
If you receive an error that says “Your message is not signed with DKIM,” it means that the email you sent failed the DKIM authentication check at the recipient’s email server. This can occur for several reasons, including:
- The DKIM signature is missing: If the email wasn’t properly signed with the DKIM signature, the recipient’s server will reject it. This can happen if the DKIM signing process wasn’t set up correctly or if there was a problem with the signing process.
- The DKIM signature is invalid: If the DKIM signature doesn’t match the contents of the email, the recipient’s server will reject it. This can happen if the email was modified during transit or if the private key used to sign the email has been compromised.
- The DKIM selector is incorrect: If the selector specified in the DKIM signature doesn’t match the selector specified in the domain’s DKIM TXT record, the recipient’s server will reject it.
To resolve this issue, you should:
- Check your email infrastructure to make sure that the DKIM signing process is set up correctly.
- Verify that the DKIM signature is being added to your emails correctly.
- Make sure that the private key used to sign the email is secure and hasn’t been compromised.
- Check the domain’s DKIM TXT record to make sure that the selector specified in the DKIM signature matches the selector specified in the DKIM record.
- Test your DKIM configuration using a tool such as DMARC Analyzer to make sure that your emails are being properly signed and that the recipient’s server is able to verify the DKIM signature.
If you’re still having issues, you may need to seek assistance from your email provider or a technical expert who is familiar with email authentication protocols.
A DKIM (DomainKeys Identified Mail) record in the DNS (Domain Name System) typically consists of a series of key-value pairs that specify information about the domain and the public key used to sign outgoing emails.
The record is stored as a text (TXT) record in the domain’s DNS zone file, and the format of the record is defined by the DKIM specification.
Here’s an example of a DKIM record for the domain example.com:
example._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDdlatRjRjogo3WojgGHFHYLugdUWAY9iR3fy4arWNA1KoS8kVw33cJibXr8bvwUAUparCwlvdbH6dvEOfou0/gCFQsHUfQrSDv+MuSUMAe8jzKE4qW+jK+xQU9a03GUnKHkkle+Q0pX/g6jXZ7r1/xAK5Do2kQ+X5xK9cipRgEKwIDAQAB"
In this example, the record specifies that the domain is using DKIM version 1, the key type is RSA, and the public key (p=) is a long string of characters that is used to verify the authenticity of the email.
It’s important to note that the exact format of the DKIM record may vary depending on the specific implementation. However, the basic structure should be similar to the example above.
Where to find the DKIM key?
- The DKIM key is typically generated by the email server that will be sending signed emails. The public part of the key is included in the DKIM record in the domain’s DNS zone file, while the private part of the key is kept on the email server and used to sign outgoing messages.
- If you’re the owner or administrator of the domain and the email server, you can find the key on the email server or in the configuration files for the email server software. The exact location and format of the key will depend on the specific email server software you’re using.
- If you’re not the owner or administrator of the domain, you can ask the person responsible for the domain or the email server to provide you with the DKIM key. They should be able to locate it on the email server or in the configuration files for the email server software.
Where to find DKIM settings if you use G Suite / Google Workspace
- Access the Google Admin console at admin.google.com using super administrator privileges.
- Navigate to Apps > Google Workspace > Gmail.
- Click on Authenticate email.
- By default, your primary domain will be selected. Choose another domain where you intend to use DKIM by clicking on your primary domain name.
- Click on Generate new record. You will be presented with the following options:
- Select DKIM key bit length: Choose a 2048-bit key.
- Prefix selector: The Gmail domain key comes with a default prefix selector called “google.” You can keep this default setting or modify it.
- Click Generate. This action will generate a DNS TXT record.
- If you are using a G Suite domain host partner, verify if the DNS TXT record generated in step 6 has been automatically added. If not, manually add the DNS TXT record to your DNS. The record will resemble the following:
- Type: TXT
- Hostname (if the prefix selector is “google”): google._domainkey
- Value: Enter the TXT record value generated in step 6.
- After adding the DKIM TXT DNS record, navigate to your G Suite admin panel and click on “Start Authentication.”
- To verify that emails are being DKIM signed, send a test email to another G Suite user and examine the headers.
- For more info on DKIM, visit https://support.google.com/a/answer/174126?hl=en&authuser=1&ref_topic=2752442%C2%A0
- For more info on DMARC, visit https://support.google.com/a/answer/2466563?hl=en
Where to find DKIM settings for Microsoft Office 365?
Steps to Create, enable and disable DKIM from Microsoft Defender portal.
- All the domains in your account are listed in the Microsoft Defender portal under the DKIM page. Go to the DKIM page and select the domain you wish to configure.
- Click to create the DKIM keys. Once clicked, there’s a window with the CNAME records.
- Copy the CNAME records and add them one by one to your domain’s DNS settings. Make sure to save the settings for both.
- Once added, go back to MS Defender and click on the Disabled button to enable the DKIM signatures.
That should take care of your DKIM settings. Make sure to test your email to make sure they are sending and being received correctly. For updated info, you can check Microsoft’s documentation here.


Where to find DKIM settings on cPanel accounts like HostGator?
The exact location of the DKIM key on a HostGator server can vary depending on the type of hosting account and the email server software being used. However, here are the steps to find the DKIM key on a HostGator server running cPanel:
- Log in to your cPanel account.
- Scroll down to the “Email” section and click on the “Email Authentication” or “Email Deliverability” icon.
- In the “Email Authentication” section, you should see a list of domains associated with your cPanel account.
- Click on the “Manage” button next to the domain you want to retrieve the DKIM key for.
- In the “Manage Domain” section, you should see the DKIM key under the “DKIM” heading.

Note that if DKIM is not enabled for your domain, you may need to enable it in cPanel before you can view the key. Talk with your hosting accounts support team if you have questions.
Sending emails that land in the inbox and not the spam folder is crucial for successful communication with your clients. Mail Tester provides a valuable solution to assess the spammy-ness of your emails and offer suggestions for improvement.
If you’re having trouble, seek assistance from your email provider or a technical expert.
By following these steps, you’ll be able to send engaging emails that are less likely to be marked as spam.




