Take the 2-minute tour ×

I have the GoDaddy hosting and send mail using the following code:

 $to = "demomail@gmail.com";
 $subject = "Test mail";
 $from = "info@brightmeup.com";
 $headers = "From:" . $from;
 echo "Mail Sent.";

When the mail arrives at its destination I see the following (in red outline)

enter image description here

I don't want to show the "via server" and for that there is an option to add a SPF record.

To do this I have followed the instructions in this page:

Managing DNS for Your Domain Names

but it's not working.

After that i have tried:

v=spf1 include:_spf.google.com ~all

as described in http://support.google.com/a/bin/answer.py?hl=en&answer=178723 but I still get the same result.

How can I solve this and prevent "via server" showing?

share|improve this question

migrated from stackoverflow.com Aug 30 '12 at 0:20

This question came from our site for professional and enthusiast programmers.

3 Answers 3

up vote 5 down vote accepted

Your spf line is wrong, let's break it down:


Version 1 SPF, everything right there, let's see the next parameters:


Here you're specifying that your mail is valid if you're sending it from a Google Apps domain. Are you using Google Apps?, the next parameter:


Denies every other domain, so if you send from a non Google Apps domain, you'll be invalid in terms of SPF. You must change your include parameter to point to your sending server (probably something like include:spf.secureserver.net inferring from the image you posted).

Also, see ceejayoz response respecting DKIM. I forgot that for a non Google Apps Domain you have to include that.

share|improve this answer
I believe for GoDaddy it's include:spf.secureserver.net. –  ceejayoz Aug 29 '12 at 17:48
Exactly. Thanks for the correction. –  Chiguireitor Aug 29 '12 at 17:53
i ahve also tried the v=spf1 mx include:secureserver.net -all but still getting the same via ..... is there anything i can do to remove the via –  Mayank swami Aug 29 '12 at 18:07
See that you must change it to include:spf.secureserver.net –  Chiguireitor Aug 29 '12 at 19:35
thankyou its works –  NullPoiиteя Sep 6 '12 at 16:30

SPF is only one of two parts of fixing this. The other is DKIM signing.


I'm a sender and I don't want my recipients to see the "via" link. What can I do?


share|improve this answer
would you mind tell me where can i get the dkim ? –  Mayank swami Aug 29 '12 at 18:10
DKIM isn't something you can just "go out and get". You'll need to implement some stuff. See en.wikipedia.org/wiki/DomainKeys_Identified_Mail and dkim.org. –  ceejayoz Aug 29 '12 at 19:17

I wouldn't use -all, unless you have everything else set up correctly, so stick with ~all.

The only time to use -all is if you have SRS - Sender Rewriting Scheme set up on your mail server. Anyone you send email to that has a forwarder set up, it will hard fail the SPF check on the message and not deliver it.

Here's an example of how this exact scenario plays out.

SRS Example

There's a lot to setting up and configuring emails, SPF, DKIM, DMARC, SRS, Etc. There's plenty of resources on the web on how to do it all, you just have to search for them.

The only way to know for sure if your email is properly authenticating, so that link doesn't show is to use one of the mail email authentication tools out there to verify your configuration. Here's a popular report a lot of people use to test their setup.

Email Authentication Report

share|improve this answer

Your Answer


