# Set your SPF record
Source: https://docs.webgee.com/en/email/what-are-the-correct-spf-records-when-using-webgee-hosting







Publish an SPF record so receiving servers accept mail from your domain. Applies
to shared, reseller and Premium hosting.

SPF lists which servers may send as your domain. Without a correct one, your mail
is treated as unauthenticated and filtered.

## Use cPanel's generator [#use-cpanels-generator]

<Callout type="warn">
  **Do not copy an SPF record out of documentation, including this page.**
  Outbound mail is routed through a relay, and the correct `include:` depends on
  which relay your account uses. A record naming the wrong one fails SPF for
  every message you send.

  cPanel knows what your server actually uses. Let it generate the record.
</Callout>

1. In cPanel, open **Email Deliverability** under **Email**.

   <img alt="The Email Deliverability domain list showing status per domain" src="__img0" />

2. Find your domain and select **Manage**.

3. cPanel shows the current SPF record, or the one it recommends.

   <img alt="The SPF section showing a valid record" src="__img1" />

Where your DNS is hosted **in cPanel**, select **Install The Suggested Record**.

Where DNS is hosted **elsewhere** — Cloudflare, or a registrar — copy the
suggested value and create a `TXT` record for your domain there.

<Callout type="warn">
  If your nameservers are not WebGee's, cPanel says so explicitly: &#x2A;"This system
  does not control DNS for the domain... If you install this record, this change
  will not be effective."* Installing it anyway appears to succeed and changes
  nothing, because the record is written to a zone no resolver consults. Add the
  record wherever your nameservers actually are.
</Callout>

## Reading the record [#reading-the-record]

A WebGee SPF record looks like this:

```
v=spf1 a mx include:spf-c.mailbaby.net ~all
```

| Part       | Meaning                               |
| ---------- | ------------------------------------- |
| `a`        | The domain's own A record may send    |
| `mx`       | Its mail servers may send             |
| `include:` | The outbound relay's servers may send |
| `~all`     | Anything else is a soft fail          |

The `include:` names WebGee's outbound relay. Take the exact value from your own
**Email Deliverability** page rather than copying it from here — the relay
hostname can differ between servers, and a record naming the wrong one fails SPF
for every message you send.

## If you also send from elsewhere [#if-you-also-send-from-elsewhere]

Add each additional sender to the **same record**. A domain must have exactly one
SPF record — two records is a permanent error, and receiving servers treat it as
no SPF at all.

```
v=spf1 a mx include:spf-c.mailbaby.net include:_spf.google.com ~all
```

<Callout type="warn">
  SPF allows a maximum of **10 DNS lookups**. Each `include:` costs at least one.
  Exceeding it produces `permerror`, which fails exactly like having no record —
  a common outcome for domains that have accumulated marketing platforms over
  time.

  Check with [dmarcian's SPF survey](https://dmarcian.com/spf-survey/) or
  MXToolbox.
</Callout>

## Check it worked [#check-it-worked]

```bash
dig +short TXT example.com | grep spf1
```

**Email Deliverability** in cPanel validates SPF, DKIM and reverse DNS together,
and is the quickest confirmation that all three are right.

## Then add DKIM and DMARC [#then-add-dkim-and-dmarc]

SPF alone is no longer sufficient for reliable delivery. Enable DKIM on the same
Email Deliverability page, then publish DMARC — see
[Publish a DMARC record](/en/email/publishing-dmarc-records-on-your-cpanel-domain).

## Related [#related]

* [Publish a DMARC record](/en/email/publishing-dmarc-records-on-your-cpanel-domain)
* [Why are my emails being marked as spam?](/en/email/why-are-my-emails-being-marked-as-spam)
