To prevent our emails from ending up in the spam folder and to ensure they reach the recipient securely, we need to make some adjustments when sending emails. In this article, we explain step by step how to configure DKIM, DMARC, and DNS settings on servers using the DirectAdmin control panel.
You can easily apply these procedures on Shared Hosting packages, VPS servers, or Hetzner location servers. Even those using Cloud Hosting and Plesk Web Hosting can proceed with a similar logic.
What are DKIM, DMARC, and SPF?
DKIM (DomainKeys Identified Mail): Adds a signature to the emails you send, so the recipient knows the email is not fake.
SPF (Sender Policy Framework): Defines which servers can send mail on your behalf.
DMARC (Domain-based Message Authentication, Reporting, and Conformance): Sets policies for DKIM and SPF mismatches and provides reporting.
If you don't make these three settings, your emails will go to spam or not be delivered at all.
Step-by-Step DKIM and DMARC Settings in DirectAdmin
1. Log in to DirectAdmin
-
Enter the DirectAdmin panel from your browser.
-
Enter your username and password, and log in.
2. DKIM (DomainKeys) Setting
-
Go to "E-mail Manager" > "SPAM Filters" or "Email Settings".
-
Find the "Enable DKIM" or "DomainKeys" option here.
-
Click and activate the DKIM signature.
When you do this, the system automatically creates a DKIM record.
Check DKIM DNS Record
-
Go to the "DNS Management" (DNS Editor) section.
-
A record like this should have been created:
Name:
default._domainkey
Type:
TXT
Data: (a long text, will be filled automatically)
If not, add it manually.
3. SPF Record
-
In the same DNS Management section, add a "TXT" record.
-
Enter the following value:
v=spf1 a mx ip4:YOUR.SERVER.IP ~all
Replace YOUR.SERVER.IP
with your server's IP address.
4. DMARC Record
-
Go to the DNS Management section again.
-
Add a new "TXT" record.
Name:
_dmarc
Data:
v=DMARC1; p=quarantine; rua=mailto:[email protected]; ruf=mailto:[email protected]; fo=1
This setting ensures that incoming emails are quarantined in case of a verification error.
5. Save DNS Changes and Wait for Propagation
-
Save all DNS records after adding them.
-
DNS propagation can take anywhere from 5 minutes to 24 hours. It usually becomes active in 1-2 hours.
Extra Precautions Against Email Spam Problems
-
Register with RBL (Real-time Blackhole List) lists.
-
Reverse DNS (PTR record) must be set correctly.
-
SMTP Authentication should be mandatory.
-
Provide email sending with SSL/TLS.
-
DKIM, SPF, DMARC records must be present.
Recommendation: If you get properly configured Professional SSD Hosting, all these settings come automatically, and you don't have to deal with extra effort.
Frequently Asked Questions (FAQ)
Can I send mail without an SPF record? Yes, you can, but 90% of your mail will go to the spam folder.
Is email verification possible without DKIM? No. DKIM is one of the most critical things in security.
Why is DMARC important? DMARC prevents fake email sending. It protects your domain name.
Can these be done with DirectAdmin on Hetzner servers? Yes. In fact, Hetzner servers are ideal in terms of performance and IP cleanliness.
Are these steps also valid for Cloud Hosting? Yes, you can apply the same steps in Cloud Hosting infrastructures.
If you follow these steps exactly, your mailings on your DirectAdmin server will be done without problems and without spam risk. If you have any questions, be sure to open a support ticket, we will help you.