SPF Record for parked domains

GoWilkes

Well-Known Member
Sep 26, 2006
703
34
178
cPanel Access Level
Root Administrator
I have several domains parked and email forwarded to one main domain.

But the question is, do I need an SPF record on each of those domains, or just the main one?

If I need it on each one, I found this script that is supposed to let you add an SPF record to every account:

Code:
cd /var/cpanel/users
for i in `ls /var/cpanel/users` ;do /usr/local/cpanel/bin/spf_installer $i ;done
Assuming that this is still valid, how do I customize it to add a specific SPF to each domain? Like:

Code:
"v=spf1 +a +mx +ip4:123.45.67.89 -all"
 

MilesWeb

Well-Known Member
PartnerNOC
May 23, 2012
173
2
68
India
cPanel Access Level
Root Administrator
Twitter
You will have to edit the zone file for the domain and edit the SPF as required. Do you wish to set a customize SPF for every domain using this script ?
 

cPanelMichael

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

Is there any particular reason you prefer to have a custom SPF record for each parked domain name instead of the standard SPF record that cPanel will generate for them?

Thank you.
 

GoWilkes

Well-Known Member
Sep 26, 2006
703
34
178
cPanel Access Level
Root Administrator
AFAIK, the standard one doesn't restrict it to the one IP, and uses a soft all instead of hard. If I have to create a record for each account, then I would want them all to be identical to first one.

But is it even necessary for parked domains? I have one actual account, and 104 parked domains.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
The following thread might be helpful if you want to utilize a custom SPF record for each domain name:

SPF Custom Entry

Thank you.
 

GoWilkes

Well-Known Member
Sep 26, 2006
703
34
178
cPanel Access Level
Root Administrator
I'm still not entirely clear, Michael. That thread stated "f you only revise the initial entry, only the main domain will be changed to that new hard-coded IP, while parked, addon, and subdomains will not be."

So, does that mean that parked and addon domains SHOULD have an SPF record?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Yes, parked and addon domain names should have SPF records because they can send out email just like the primary domain name associated with the account can. If you enable a SPF record for an account, it adds it for the parked/addon domain names added to the account.

Thank you.