homepage Welcome to WebmasterWorld Guest from 54.234.200.85
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
php redirect script for affiliate links
php redirect affiliate link
mihomes




msg:4471877
 6:41 pm on Jul 2, 2012 (gmt 0)

Been doing some research on this lately and have decided the best way to handle my affiliate links is to create a php script which I can call and then redirect to the actual affiliate link. It was said the great Matt Cutts even recommended this.

So, few questions...

- Would it be correct to use something along the lines of www.mysite.com/script.php?id=product1 which then redirects to the actual url?

- Would I use rel=nofollow on the www.mysite.com/script.php?id=product1 in my pages?

- in robots.txt would I also exclude script.php even with the nofollow or just exclude it without the nofollow?

Going a step further into the thought process what kind of security steps should be taken so the script cannot be manipulated? Simple thinking tells me if I use id=whatever that the script could not be manipulated as anything value that does not exist I could just send to the index page or something - correct?

Anyone care to share a good example I can run with or flat out use?

Tedster... you seem to be on most of the posts regarding the affiliate redirects I read... please chime in if you have the time.

Thanks everyone!

 

mihomes




msg:4472942
 7:26 pm on Jul 5, 2012 (gmt 0)

nobody?

enigma1




msg:4473478
 1:57 pm on Jul 7, 2012 (gmt 0)

Some thoughts about your questions:

1. Yes with the script.php handling the redirect
2. No need to, instead use js hooking the click handler with a unique identifier perhaps to avoid automatic submissions.
3. You won't have to if you use js because there would be no visible/hard link.

mihomes




msg:4473526
 8:46 pm on Jul 7, 2012 (gmt 0)

Thanks for the reply, but I want to stay away from using js and only use php.

I'm still doing research on this and the one question that stands out to me is this :

www.mysite.com/script.php?id=product1 ... this seems as though, Google for example, might see this as cloaking as I am showing the above link, however, directing the user to another (affiliate link)... thoughts on this? As a webmaster I can see many reasons why the above would be beneficial to me (easily change sitewide links on one page, etc, etc), however, does Google see it that way? Some would say the fact I am questioning it means I should be leary of it.

I also have seen sites which use the same format above, however, their id value in this case IS the url they want to redirect to... in other words they are not hiding anything (which Google likes)...

Opinions?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved