# Setting up SPF record inside DNS

Source: https://www.hukot.net/community/en/tutorials/setting-up-spf-record-inside-dns
Updated: 2026-11-26

One of the protections against recieving spam e-mails from unwanted domains is the e-mail [validation system SPF](https://en.wikipedia.org/wiki/Sender_Policy_Framework).  
SPF allows administrators to specify which mail servers can send mail for a given domain.  
SPF is set up by adding a TXT record to DNS.

If your DNS is managed by Hukot.net and you use e-mail services from Hukot.net, continue to step 4 below. If your DNS is not at Hukot.net, skip to step 5.

### 1. Logging in

Log into webhosting administration [admin.hukot.net](https://admin.hukot.net).

![](https://www.hukot.net/community/userfiles/users/4/images/download%20(4).png)

### 2. Editing DNS

Choose tab **"[Domains](https://admin.hukot.net/)"**.

![](https://www.hukot.net/community/userfiles/users/4/images/NzlX80XOTNu1NE_ju6fAOg.png)

**Choose the domain** you want to set up SPF for from the list and click on button **"Edit DNS"**.

![](https://www.hukot.net/community/userfiles/users/4/images/oghg0gimQCGzD1KrMlyxfg%20(1).png)

### 3. Adding DNS record

Record type will be TXT and values can be:

- *value = v=spf1 mx -all*
    - **All mail servers set in MX records will be trustworthy**
- *value = v=spf1 a:mail.my-domain.cz -all*
    - **Only e-mails from mailserver mail.my-domain.cz will be trustworthy.**

**Parameter *-all / ~all / ?all*** determines how strict it will be with spam evaluation.  
Alternatively, we can enable evaluation using A record (parameter "a").

A domain may have only one TXT record starting with `v=spf1`. If you already have one, edit it instead of adding a second one, otherwise SPF stops working.

![](https://www.hukot.net/community/userfiles/users/4/images/admin/eng/Setting%20up%20SPF%20record%20inside%20DNS/FBGBxUatSSKNB6xmqpuRtQ%20(1).png)

Click on **"Add"**.  
New record will be applied relatively fast. In case you were editing the record, you have wait for TTL.

### 4. Automatic activation of SPF and DKIM

If your DNS is managed by Hukot.net and you use our e-mail services, you can set up SPF and DKIM directly in the web hosting settings by checking these options in the "Basic information" block:

- Automatic e-mail signing - DKIM
- SPF record

![](https://www.hukot.net/community/userfiles/users/1593/images/aktivace_SPF_DKIM.png)

After you save, the required records are added to the DNS zone automatically. The settings take effect within about 60 minutes.

### 5. Activating SPF and DKIM if your DNS is not at Hukot.net

If your DNS **is not managed by Hukot.net**, do this at your DNS provider:

**SPF:** add a new TXT record to the DNS zone: `v=spf1 a mx include:spf.hukot.net ~all`

**DKIM:** activate DKIM as in step 4 and you will receive an e-mail with the TXT record to add at your DNS provider.

**We're done! =)**
