![]() |
Tip: Affiliate link redirects - Earn more money
It's friday and im in a good mood so thought i'd share this little tip with for any blog owners/site owners that have a lot of affiliate links on their pages.
If you aren't already redirecting them, well you should be and here's how: Create a PHP file with the following code and your desired affiliate code/text. PHP Code:
Then in your .htaccess file (create one if you dont have one) add: Code:
RewriteEngine On To include that link on my pages i would just add a link to: http://www.domain.com/link/reality-kings When clicked that will redirect to the sponsor link :) Remember to block the /link folder in your robots.txt file Benefits of this technique: 1. SEO benefits - google isnt fond of too many affiliate codes on landing pages and it also helps prevent bleeding or diluting of your pagerank score. 2. Prevent any pc tools or other malware stripping out or replacing your affiliate code. 3. Earn more money! for example today's nastydollars bonus day all i did was alter a few URL's in the link.php file and now all my inthevip/vipcrew/ links all go through the reality kings tours. Tomorrow i can just re-edit that file rather than the 100's of hard coded links on my sites. |
thanks. i was wondering how to do that.
|
Note:
Might not have been clear but in the link.php file you need to have a ',' after every line in url code except for the last line! |
Nice tip!
|
thats cool! thanks
|
seems quite complicated to me, why not just put a simple redirect in htaccess?
|
Quote:
thank you very much for the code appreciated! :) |
Didn't worked with me
It shows a 404 error always... |
Quote:
|
Quote:
:) |
Thanks for the tip.
|
I'd love for everyone to adopt this.
Would increase the weight on my referal codes bigtime. |
Quote:
Take the above PHP code, modify it like this: Code:
<?php ... and keep one PHP file like this for each site promoted in a central directory, like /links, and call them accordingly :) Doesn't cut out PHP usage... but it'll save some cycles ;) |
*NO* PHP at all btw:
Create subdirectories for each "promotion target" in the /links directory, like /links/YourSponsor-NasySite/ ... ... and stuff this into each subdirectory's .htaccess (this will need editing each subdir's htaccess for the appropiate redirection target): Code:
RewriteEngine On |
Actually scratch my previous post, and use this instead:
(corrected a couple of errors, including making it slightly more SE friendly) Code:
RewriteEngine On |
nice tip.
Take it to the next level and create a database of the links. So then you can have a nice control panel that handles it all.:pimp:pimp:pimp |
bDok: niiice thinking! :thumbsup
|
its a very good tip... mainly the reasoning on how its easy to swap out hundreds of links easily.... although you could search and replace in your database too if need by...
i've always liked this 100% automatic plugin; http://w-shadow.com/blog/2007/07/28/...for-wordpress/ I know it doesnt give you easy control over where the links point, but i have a technical background and a couple programmers on staff that im sure would easily search and replace (grep) if i ever needed... never needed to though. |
Awesome tips. Thanks Diligent.
I might well be dreaming that this happened - a useful thread on GFY. Wow. |
great tip,was searching for something like this :)
|
Thanks for the thanks guys, useful stuff is always nice eh? :)
(Keep gratiuty in store for ionic as well though, he initiated this stuff here) Which brings me to correct my first post in this thread, can't believe how sloppy I was with the code hehe: If You wanna go the PHP route, the way I suggested, I missed an important semicolon.. so here we go again, fully correct this time: Code:
<?php |
so google prefers redirects over ref codes?
|
Quote:
RewriteEngine on Options +FollowSymlinks RewriteRule ^go/ladyboygold/ http://join.ladyboygold.com/track/NzkwOjk6Ng/ [R=301,NC] then go to http://www.yourdomain.com/go/ladyboygold/ and apache automatically redirects to the url above. I've tested this with join links, test signups and such and this method works the best. Granted the .htaccess file can get to be a bit large, its still better than running PHP that essentially does the same thing. |
In the long run, the ionic method is far better from an updating standpoint when you run a ton of sites on many different servers... here's another tip on how to use this (been doing this myself for 3 years now)... If you have multiple sites on one server, create a common directory somewhere...
example. /www/domain1.com/html /www/domain2.com/html /www/domain3.com/html /www/domain4.com/html /www/links <- create this one. Now put that links.php file in that directory. i.e.: /www/links/links.php Now for each of your sites, you simple put a links.php file in there that includes that core file (as well as the .htaccess file). i.e. /www/domain1.com/html/links/links.php /www/domain2.com/html/links/links.php /www/domain3.com/html/links/links.php /www/domain4.com/html/links/links.php /www/links/links.php <- core file the links.php file for each domain just has the following in it: <?php @include('/www/links/links.php'); ?> Now you only have to update one file per server and ALL your sites are updated at once. That code can be expanded like crazy to add in campaign tracking per site, log the clicks or whatever... the only issue is that you will end up with 1000s of links in that file which will make it very big.. At that point you need to start breaking it up into sections. Could be done per sponsor. eg: these ones contain all the links: /www/links/nastydollars.php /www/links/bangbros.php /www/links/topbucks.php then each site could be /www/domain1.com/html/links/nd/links.php /www/domain1.com/html/links/bbo/links.php /www/domain1.com/html/links/tb/links.php And those links files include the approriate sponsor core link file. You'll need to adjust the .htaccess file for the correct path. Couple other things.. You should send a proper 404 if the script fails etc. So I'd mod it like this and also do a couple things to try and cut down on the size of the file when you start adding more and more links.. Code:
<?php |
The same can be done for custom galleries... just put symbolic links to your other image directories and then put in different header/footer images in that specific virtual directory and you've duplicated the content without wasting space :)
|
Quote:
|
I'm shocked! An actual useful thread in GFY!! .............the world is coming to an end.......bookmarked since this happens once every million posts
|
All times are GMT -7. The time now is 07:17 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123