nootkan

Well-Known Member
Oct 25, 2006
170
12
168
Just noticed that some of my spf records are different than others and wanted to confirm the proper way to add them. I have two ip addresses associated with ns1.domain.com and ns2.domain.com.

I see these two spf records and my gut is telling me to use the second one for all domains but just wanted to confirm this or not. I added the ns1 and ns2 for clarification but only the ip addresses show in the text box.

"v=spf1 ip4:ns1 ipaddress +a +mx ~all"
"v=spf1 +a +mx +ip4:ns1 ipaddress +ip4:ns2 ipaddress ~all"
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

The SPF record configured by cPanel will use the main server IP address. This is by design. The use of "+a" and "+mx" in the SPF record accounts for the possibility the domain name is assigned a dedicated IP address. You can enable the SPF record via cPanel for a test account to see the format that's used by default.

Thank you.
 
  • Like
Reactions: nootkan

nootkan

Well-Known Member
Oct 25, 2006
170
12
168
Hello :)

The SPF record configured by cPanel will use the main server IP address. This is by design. The use of "+a" and "+mx" in the SPF record accounts for the possibility the domain name is assigned a dedicated IP address. You can enable the SPF record via cPanel for a test account to see the format that's used by default.

Thank you.
Michael, thanks for your reply. Yes I know the default format used by cPanel is the first example I provided. I just wanted to know if there was any advantage or if it was necessary to use example number two when I have two different ips assigned to my nameservers on my dedicated server. Was hoping someone here may have a little more experience and knowledge than I in this field and provide some guidance. I am researching the issue as we speak also.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
No, it's not necessary to add the IP addresses of your name servers. The following guide offers some helpful hints on SPF records:

SPF: FAQ/Common mistakes

Thank you.