In this article you will learn:
- What SPF, DKIM and DMARC are for and how they work
- How to set up these mechanisms
- Common problems
- Frequently Asked Questions
SPF, DKIM and DMARC
SPF, DKIM and DMARC are measures against fraudulent emails. If you don’t use them, or if they are not set up correctly, you increase the chance that the recipient’s system will mark your message as spam, or reject your email and return it as undeliverable.
- SPF (Sender Policy Framework) is an email authentication system that allows domain owners to use a special DNS record to specify which servers are permitted to send emails on behalf of their domain. Recipients can then verify the SPF records and decide whether to accept, reject, or otherwise process the email.
- DKIM (DomainKeys Identified Mail) is a method that allows the organization responsible for sending an email to attach a digital signature to the message. Recipients can verify this signature and thus confirm that the email was not altered after it was sent and that it comes from a legitimate source.
- DMARC (Domain-based Message Authentication, Reporting, and Conformance) is an email authentication policy and reporting protocol that helps protect email domains from abuse such as phishing and spoofing. DMARC uses SPF and DKIM to verify that the emails sent are legitimate, and defines how the recipient should handle emails that fail verification. It is set up using a special DNS record.
Setting up email authentication mechanisms
To ensure maximum deliverability of your email, set up all of the protection mechanisms mentioned. Whenever you change or add a provider (for example, if you use a bulk email service in addition to our email), make sure you integrate SPF correctly according to that provider’s manual.
Setting up an SPF record
An SPF record specifies the servers authorized to send email on behalf of the domain or subdomain for which it is set. Detailed instructions for setting up DNS records can be found in the article DNS – Domain Records.
Set at most 1 SPF record for a domain. Listing multiple records will invalidate SPF verification.
If you send emails exclusively through VEDOS services (Webhosting, WebSite, Mailhosting) without WEDOS Protection ⧉, set the SPF record:
Name TTL Type Data (empty) 300 TXT v=spf1 mx a include:_spf.we.wedos.net -all

If you use exclusively another email provider, use SPF according to its guide. If you need to enter multiple providers, or you are having problems with SPF, follow the article Email – SPF Record.
Setting up DKIM
We handle email verification through DKIM entirely on our side.
To verify messages sent from web hosting using the PHP mail() function, we use the following DNS records, which we usually generate automatically on our servers:
Name TTL Type Data key1.wedos-dkim._domainkey 300 CNAME key1.dkim-we.wedos.net key2.wedos-dkim._domainkey 300 CNAME key2.dkim-we.wedos.net
If you use external DNS, or for any reason you don’t have these records for a domain pointing to our Webhosting, add them. For these records to work correctly, also make sure of the correct return-path parameter setting.
Emails sent via SMTP are verified using a shared DKIM key at the address shared.dkim-wes1.wedos.net. This setting is automatic. You don’t need to enable it anywhere, but you also can’t disable it.
Setting up DMARC
A basic DMARC record that will improve email deliverability looks like this:
Name TTL Type Data _dmarc 300 TXT v=DMARC1; p=none; rua=mailto:your-email@domain.tld
where your-email@domain.tld with the email address to which you want any aggregate reports to be sent.

Common problems
Common problems include:
- Continued spamming or non-delivery of email
- SPF, DKIM and DMARC not working when sending with the mail() function from web hosting
- A message about being sent via the domain shared.dkim-wes1.wedos.net is displayed
- Incompatible DMARC
Email with SPF, DKIM and DMARC is undeliverable
Problem: Even though SPF, DKIM and DMARC are set up, email ends up in spam or is not delivered at all.
Solution: Check that all your records are set up correctly and have propagated (DNS record changes can take 30–60 minutes or longer to take effect). The most common mistakes are multiple SPF records for one domain and enclosing record data in quotation marks.
If you suspect that emails are being blocked by the sender or the recipient, follow the guide Email – Blocking.
Sending via the mail() function
Problem: When sending through the mail() function on web hosting, SPF, DKIM and DMARC all fail.
Cause: In the default configuration of the mail() function, the sender of such emails is the web hosting server, for example hcX-wdXXX.wedos.net, to which the records you have set up do not apply.
Solution: In the mail() function, set a return-path containing an address on your domain according to this guide.
Via the domain shared.dkim-wes1.wedos.net
Problem: The recipient of the message sees an unwanted notice about the message being sent via the domain shared.dkim-wes1.wedos.net.

Solution: Make sure your SPF record is set up correctly and has propagated. If it is, this notice should not be displayed.
Incompatible DMARC
Problem: An advanced DMARC configuration marks messages as problematic.
Cause: For emails sent via shared.dkim-wes1.wedos.net DKIM alignment does not work correctly.
Solution: Make sure you have a valid SPF record and, if necessary, adjust the parameters of the DMARC record.
Frequently Asked Questions
Is all of this really necessary?
If you want your emails to be trustworthy, yes. Different providers have different rules for spam and for rejecting emails, but at least SPF and DKIM are essential for reliable delivery.
Can you set it up for me?
DKIM DNS can be set up automatically by pointing the domain to the hosting according to this guide. We generally do not set up SPF and DMARC records, because we don’t have enough information about the email services you use, whose operation we could jeopardize with an incorrect setup. We can set up the basic records listed in this guide for you, but it is a paid service according to the price list.
How do I make sense of DMARC reports?
You can find the basics of reading DMARC reports, for example, in our community guide ⧉.