On a new site development I need to establish email for a splash page. Currently I have a domain from one company (will call Company1), using Netlify or GitHub pages for hosting the site, and using an email server from another company (will call Company2).

I've pointed the nameservers from Company1 to Netlify but I'm unsure how to go about setting up mail and getting the SPF and TXT records.

Currently I have in Netlify:

Type Name value
A mail.example.com IP xxx.xxx.xx.xxx from Company2
A webmail.example.com IP xxx.xxx.xx.xxx from Company2
MX example.com mail.example.com
SPF example.com ??
TXT example.com ??

I've used MX Toolbox but I get:

Invalid Input. 'mx' requires a Fully Qualified Domain Name. example.com/ is invalid.

In my research trying to learn what is the correct way to go about this I've read:

What is the correct way to get SPF and TXT for mail? Sorry if I'm going about this incorrectly I'm new at this.

2 Answers 2


You will have to ask Company 2 for their SPF record details. It may be as simple as their IP address, or if they have multiple IP addresses they may have an include link e.g. Google's SPF is include:_spf.google.com

Same for the TXT record, it is generally only needed for some sort of verification. If Company 2 requires that, then they will give you a code. e.g. Microsoft wants something like ms=1234567


Sender Policy Framework (SPF) records are used to help prevent email spam. These records allow an email service provider to determine whether or not the sending IP address belongs to a trusted third party. If the receiving server determines that the email was sent from a non-trusted IP address, then it may block the message or move it to the spam folder as per the policy.

There is no DNS record type like SPF. SPF record adds in the DNS zone as a TXT record.

In your case, you will have to add an MX record in the DNS zone of the domain, and it should be pointed to the Company2 email server.

Like if you have the domain name example.com, you will have to first add the following record in the DNS zone of the domain example.com,

Name: mail IP address: Company2 email server IP Record type: A

MX record for example.com:

Name: blank Value: mail.example.com priority: 0

For the SPF record, you can use the below syntax:

v=spf1 mx ip4:Your_Mail_Server_IP_address(Company2) ~all

Example: v=spf1 mx ip4: ~all

In the DNS zone of domain example.com, you will have to add the following record for SPF:

Name: blank Value: v=spf1 mx ip4: ~all Record Type: TXT

You can also use the below tool to create an SPF record: https://mxtoolbox.com/SPFRecordGenerator.aspx

You can ask Company2 to provide you DKIM record. DKIM stands for DomainKeys Identified Mail. A DKIM-signed message is digitally signed using the sender's domain name and email address. When a recipient receives a DKIM-signed message, they first verify the signature using the public keys associated with the domain name and email address that sent the message. If the signature is valid, then the recipient knows that the message was sent by the owner of the domain name and has not been altered in transit.

Please note that DNS records may take 12-24 hours to propagate globally.

  • 1
    "There is no DNS record type like SPF" There was, in the past. So even if deprecated, it still shows in some systems. See iana.org/assignments/dns-parameters/… for list of all record types, and SPF is listed. Commented Aug 22, 2022 at 17:55
  • "Please note that DNS records may take 12-24 hours to propagate globally." No, that is not true. There is no generic hardcoded value, it only depends on TTLs. Please don't propagate those myths, including delays or "propagation" as the DNS is not top down. Commented Aug 22, 2022 at 17:56
  • "SPFs are records that are included in the header of emails sent from a domain name. " That is not true at all. SPF is a technology using DNS records (TXT as you say yourself) that the receiving end can use to assess if the email is coming from "valid" IP addresses. There is nothing in the email itself. You may be mixing things with DKIM, which has indeed both email headers and DNS records. You have a whole paragraph for it but that does not correspond to OP question. You could as well then talk about DMARC, or even BIMI... Commented Aug 22, 2022 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.