Mon-Fri 9:00-17:00

SPF, DKIM and DMARC: what they are and how to set them up

What SPF, DKIM and DMARC records do, which values to use for mail on Semafi hosting and how to check that they are set up correctly.

Email 2 min read 196 views Updated: 08/11/2026

SPF, DKIM and DMARC are DNS records that receiving servers such as Gmail or Outlook use to check that a message from your domain really came from your server. Without them, your mail is more likely to land in spam and, in some cases, to be rejected outright.

01Check what is missing

Go to Services → your hosting → Diagnostics. It shows the status of your SPF, DKIM and DMARC records, and the Check DNS button suggests which records to add.

02SPF: who may send mail for your domain

SPF lists the servers allowed to send mail on behalf of your domain. For mail on our hosting, we suggest this TXT record on the root domain:

v=spf1 a mx ip4:146.59.46.156 ~all

A domain can have only one SPF record. If you also send mail through another service, such as a newsletter platform, add it to the same record rather than creating a second one.

03DKIM: a signature on every message

The server signs each outgoing message with a private key, and the recipient checks the signature against the public key published in DNS. If Diagnostics reports that DKIM is missing:

  1. Log in to DirectAdmin (here is how).
  2. Go to E-mail Manager → DKIM and enable DKIM for the domain.
  3. The key is published as a TXT record named x._domainkey (selector x).

04DMARC: what to do with suspicious mail

DMARC tells receiving servers how to treat messages that fail the SPF and DKIM checks. Add a TXT record named _dmarc:

v=DMARC1; p=quarantine; rua=mailto:[email protected]

p=quarantine sends such messages to spam. If you would rather start cautiously, use p=none first: nothing is blocked, and reports are sent to the rua address. Once you are confident your own mail passes, switch the policy to quarantine.

05Where to add the records

  • If the domain uses ns1.semafi.pl and ns2.semafi.pl, you edit the records in our client area.
  • If the domain's DNS is hosted elsewhere, for example on Cloudflare or with your registrar, add the records there. You can copy the DKIM key from DirectAdmin.

06Checking the result

After adding the records, wait a little and run Diagnostics again. You can also send a test message to the free mail-tester.com tool, which shows whether SPF, DKIM and DMARC are recognised.

If something does not add up, open a ticket and we will help you set the records up.

Was this article helpful?

Still stuck?

Open a support ticket in the client area with your domain, the error message and what you have already checked. We reply within 24 working hours; by phone Mon–Fri 9:00–17:00 (CET).

↑ Back to top