← All posts

How to add an SPF record in Namecheap

SPFNamecheapHow-to

Namecheap manages DNS from the Advanced DNS tab of each domain. An SPF record is a TXT record there.

Before you start

  • Gather the include: values for every service that sends mail as your domain.
  • Check that your domain uses Namecheap BasicDNS or PremiumDNS (Domain tab, Nameservers). If it uses a custom nameserver, such as Cloudflare, edits in Advanced DNS have no effect and you must add the record at the DNS host.
  • Look for an existing SPF record. There must be only one.

Add the record

  1. In Namecheap, open Domain List and click Manage next to your domain.

  2. Go to Advanced DNS.

  3. Under Host Records, click Add New Record.

  4. Type: TXT Record.

  5. Host: @.

  6. Value: your SPF string, for example:

    v=spf1 include:mailgun.org ~all
  7. TTL: Automatic. Click the green check mark to save.

Editing

If a v=spf1 TXT record already exists, edit it. Insert new include: mechanisms before ~all. Remember that the total number of DNS lookups must stay at 10 or fewer.

Email forwarding note

If you use Namecheap’s free email forwarding or Private Email, Namecheap may have created its own SPF record for you. Merge those includes into your single record rather than keeping both.

Verify

dig +short TXT example.com

Confirm the output has one v=spf1 line. For details on interpreting results, see how to read email headers.