- 5 Easy to Implement Conversion Rate Optimisation TipsPosted 35 days ago
- SEO Keyword Goal – Attract Customers NOT VisitorsPosted 117 days ago
- How To Add Amazon Affiliate Links Into a WordPress PostPosted 514 days ago
- Grabbing Those Extra Affiliate Sales – Earn Extra Money OnlinePosted 516 days ago
- How I Make Money Online With Worpdress Websites – Part 2Posted 550 days ago
- How I Make Money Online with WordPress WebsitesPosted 723 days ago
- Clickbank Affiliate Products that Provide Recurring IncomePosted 837 days ago
- How to Make Money Online in 2013?Posted 874 days ago
- Find a Product in Clickbank and Create an Affiliate HoplinkPosted 1250 days ago
How To Cloak Affiliate Links Manually Using PHP Redirect
Internet marketers and bloggers live and breathe affiliate links, weaving them into their content here and there, trying to make them look appealing. The best way to make your affiliate links looks good is to cloak them. This means that instead of having ugly links with all the tracking numbers exposed, you can cloak affiliate links manually using PHP redirect. Of course there are plugins that do this for you, like Ninja Affiliate ($1 trial at the moment) or Thirsty Affiliates.. They are both great plugins but if you like doing things yourself then creating PHP redirects is not that hard.
Cloak Affiliate Links Manually Using PHP Redirect
To cloak affiliate links manually using PHP redirect you will need access to your server. This is only possible if you have your own paid for web hosting and will not work on free blogs.
1. Logon to your server. Go into the root of your domain.
2. Create a new folder. Name it as you want the link to appear. For example, if you want the link to be tips4pc.com/PcMatic then you would call the folder PcMatic.
3. You can also put the PcMatic folder in another folder like tips4pc.com/go/PcMatic. This just means you make a folder named GO in the root, then go into that folder and make another folder called PcMatic.This way you do not have to overcrowd your root domain with new folders. You can put all of the affiliate folders into one neat folder.
4. When you are in the PcMatic folder, click on the create file icon and name the new file index.php.
5. Paste the code shown below into the file and save it. Make sure you replace my affiliate link with yours.
<?php
header( ‘Location: http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=Mitzpantic-’ ) ;
?>
Video – How to Cloak Affiliate Links Manually
It is much better to cloak your affiliate links because here is a perfect example why:
Uncloaked Link: http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=Mitzpantic-
Cloaked Link: http://letsbuildwebsites.com/Hostgator













Frin
November 7, 2012 at 8:59 am
I actually use custom affiliate links and they don’t look too bad on my blog so I don’t really have much of an issue with this.
Alicia
October 5, 2012 at 12:43 am
Thanks for sharing with us this handy tip. Looks really easy. It is nice to know that we can cloak links without using a plugin!
Alicia recently posted..Jigoshop eCommerce Plugin Review
Suzie
September 25, 2012 at 3:39 pm
Hello,
Interisting post. For WordPress I’m using now the “Redirection”, just search for it in the plugin install box and you’ll find it. It also logs everything, which is also nice for your click stats…
(dofollow)
Suzie recently posted..Vodafone V1415
Erik
September 24, 2012 at 8:32 pm
Hello,
I followed your directions exactly, however when I try to go to the link at the end i’m getting this error message on the website:
Parse error: syntax error, unexpected ‘:’ in /home/madupz/public_html/recommends/index.php on line 2
What do you think the problem is?
Thanks,
mitz
September 26, 2012 at 5:27 am
Just doublecheck the url which is your link and the actual code you pasted into the index.php. There must be an error.
John K Lemieux
September 6, 2012 at 11:23 am
i use plugins when I work in wordpress, everything has a plugin for it. But its good to know we can do this manually.
John K Lemieux recently posted..Eyes Slider
Andy
September 1, 2012 at 8:22 pm
Hey Mitz,
nice Idea – but what do you do when having 20, 50, or more Links ?
what when you need to change / edit a link ?
wouldn’t it be easier to use something like Ninja-Affiliate to get all links organized in a simple way ?
Andy recently posted..5 Important Steps for homepage beginners
Mitz
September 2, 2012 at 8:33 pm
This is the same. You only edit one link and it changes all your previous redirects. Of course it is easy to use a plugin too! I try not to use too many plugins that your site will rely on. Especially when it comes to making money. I had a plugin I had to take out and it took me days to redo my links. While this was going on I lost sales.
Vektor
September 1, 2012 at 6:04 pm
Firs thing i said when i saw your post title is “WOW”. I have been while searching everywhere to know how can i clock my affiliate links , and here you are guiding me. Thanks alot.
Aswin Vayiravan
August 21, 2012 at 5:23 pm
Is this a fair marketing practice?People should not be conned!
Affiliate links should be explicitly mentioned so that readers are fully aware of what they do!
Aswin Vayiravan recently posted..The Best Communication, Work and Play Apps For The iPhone
mitz
August 23, 2012 at 3:58 am
This is exactly why i use the product name in the url so people know what link they are clicking on. It also says this in the article. it looks better than 3hdof333.395je.com ??? At least with a product name they know where the link will lead.
kevin
August 20, 2012 at 10:22 am
hi Mitz.
It is best idea. I have read this article, It is very informative. I like it.
i will use the php code to my wordpress
nick
August 19, 2012 at 5:53 am
I actually use custom affiliate links and they don’t look too bad on my blog so I don’t really have much of an issue with this.
Jessica
August 18, 2012 at 12:42 am
Thanks for sharing this, Mitz – this is great! You are right, cloaked addresses look so much better than and I had actually been wondering if there was a way to change them. The video is super helpful!
Jessica recently posted..Stepping Out: Soho House’s sophisticated little sister
Stan
August 17, 2012 at 12:27 pm
Hi Mitz,
PcMatic is a great tool and this video confirms it. Cloaked addresses look more user-friendly.
Mitz
August 17, 2012 at 9:33 pm
I agree Stan!! PCMatic is a great tool and cloaking looks better to the visitors. I also like to “nofollow” these links so google does not think there are pages that exist for these links.
Richard
August 17, 2012 at 11:19 am
A nice little php trick that just works
I can think of a few things to use this for.
Thanks Mitz!
Jean-Luc
August 14, 2012 at 10:04 pm
Thanks for the tip!
I’m using the redirection plugin, which allows you to create a simple redirection
It’s great, free and easy to use
Jean-Luc recently posted..Patrimmo Commerce Bulletin Trimestriel T2 2012
Aayna
August 14, 2012 at 5:36 pm
A great post Mitz! This post can provide a great help to those set of individuals who are quite new to the world of blogging. The video is worth watching. Cloaking the affiliate links is indeed a nice option. Thanks for sharing this valuable information.
Aayna recently posted..Beat the Budget by Learning How to Sell Jewelry for Cash
Andrei
August 12, 2012 at 12:47 pm
Good tutorial friend, now i’ve learn another trick for a little revenue. Keep posting.
Andrei recently posted..Natural plants with antibiotic properties
ysk
August 12, 2012 at 11:33 am
Thanks a lot for this tip. It’s definitely worth a try instead of a plugin.
ysk recently posted..Rome blue
John Will
August 12, 2012 at 9:37 am
Hi Mitz!
Great article.I was looking to try it for my webiste and it’s really a big help.Now i think it would surely help me getting click on my affiliate links.
Azam
August 11, 2012 at 7:29 pm
Hello Mitz I was really need such a remedy since long ago. You are really providing us a good guide line about web development.
Azam recently posted..Silpada Designs National Conferences
saju
August 11, 2012 at 5:27 pm
The only thing PHP,which is seems like very difficult to me,hope you will make some tutorials about it soon…..
saju recently posted..Some Micro Freelancing Sites | Experience Not Needed
John Smith
August 11, 2012 at 10:00 am
I was searching all over the internet for this PHP redirect and recovering my aff links and finally found it. Thanks bro!
John Smith recently posted..Creatine Loading Phase
Glen
August 11, 2012 at 6:59 am
Great video! I haven’t tried cloaking yet but it looks so easy that I would have to keep my hands busy of the weekend because of this! thanks!
Dedicated PHP Programmer
August 11, 2012 at 6:51 am
Wow! Amazing post! Great use of PHP! I didn’t know about this before…Thanks for sharing!
Friv
August 11, 2012 at 4:24 am
This is really great tutorial for cloaking the affiliate links manually. Thanks for share. So very Thanks.
Greg
August 10, 2012 at 10:57 pm
Mitz, awesome tip!! So much better than using htaccess or link shorteners.
Question regarding these links…any way to track when/number of clicks?
SEO news
August 10, 2012 at 4:45 pm
Miz this post is really good, I was also having trouble with affiliate links and wanted to cloak as search engines especially Google is having problem with affiliate links. My site is built with WordPress and I finally get figured it out.
Pavel
August 10, 2012 at 1:26 pm
This is a pretty neat way to mask affiliate links. I actually use custom affiliate links and they don’t look too bad on my blog so I don’t really have much of an issue with this. However if I start using other affiliate links I might need to cloak to make my blog look decent.
Meka
August 10, 2012 at 12:17 am
oh that’s so smart
the idea didn’t even come to my mind!
thank you so much
Meka recently posted..Why you lose a lot of money when you sell with Paypal Alone
Vic
August 9, 2012 at 8:45 pm
I´m wondering if this is the solution I was looking for to get more clicks on my affiliate links!!! this tutorial has helped me do it manually…cheers mate
Annetta Powell
August 9, 2012 at 7:33 pm
Hi Mitz,
Found your blog through your guest post in comluv.
I am not an affiliate marketer but mostly a network marketer. But I do affiliate marketing as well. Since I have several sites hosted in the same hosting account, if I do php redirect, is it going to screw up the other sites? I really don’t deal with the hosting account as I have someone managing it. I think I should go for the Ninja plugin to make it easier.
Annetta Powell recently posted..Network Marketing Scams – Fact Check List
mitz
August 10, 2012 at 12:17 am
I agree the plugins make it easy also..but the redirects are placed in the root of the different domains so they wont mess with each other.
Prakash
August 9, 2012 at 7:00 pm
This is really great tutorial for cloaking the affiliate links manually.
Thanks Mitz for sharing it……….
Prakash recently posted..Scarlett Johansson Hot Wallpapers
Raj
August 9, 2012 at 3:53 pm
Hi Mitz,
It is a nice article I have gone through ,I am not used cloaked Affiliate Links manually though I owned a web site design a web hosting site so far. But I will surely opt the guideline you have shown. Thanks again
D.J. Maak
August 9, 2012 at 7:39 am
Hey Mitz,
This is always a great thing to know and the method I prefer using for my links. I’ve never seen the point in investing in a plugin to do it when it’s pretty simple to do it by yourself. Also by doing it this way, you only ever have to change one link if your affiliate link changes rather than going through all your posts and changing all your links if you were to use affiliate links straight up.
(dofollow)
D.J. Maak recently posted..Michael Fiore Text Your Ex Back 2.0 System Launches
Fatima Hipolito
August 9, 2012 at 3:44 am
Nice, you did great mitz, I will share this page to my friends so they will see it too…
Fatima Hipolito recently posted..glock accessories sale
Pavel
August 8, 2012 at 9:37 pm
A very useful trick! I was actually looking for a way to cloak affiliate links on my blog and I was considering getting the plug-ins to do this. I’ll try you way and see how it goes. Thanks for sharing Mitz!
Shane Ryans
August 8, 2012 at 8:53 pm
Great work around. With all the updates it is getting hard to do things like this. Nice tutorial
Shane Ryans recently posted..Why keyword negatives are important
Nawaz
August 8, 2012 at 3:11 pm
Hi Mitlz
Good tutorial but I think one should be master of PHP to get benefit from this tutorial.
Simmeon
August 8, 2012 at 12:34 pm
Morning Mitz,
I prefer a custom link for affilaite links, one the just look better and two if you use a plugin you can moniter the amount of clicks you are getting per link. Still nice and simple way using PHP which I’ll save for later.
(dofollow)
Simmeon recently posted..Overcoming My Fear – Failing, Doubts And Public Speaking
Aditya
August 8, 2012 at 12:07 pm
Hey Mitz,What a timing Mitz…I have been looking for this from morning but couldn’t do cloaking,my developer ssaid he will soon find the solution but thanks to you.You are a savior
Aditya recently posted..ERP Software India
Jasmine
August 8, 2012 at 7:31 am
Good tips again, Mitz. Indeed, cloaking an affiliate like makes it shorter, more user friendly and definitely more clicks! Hooray, that means more sales!
Jasmine recently posted..GreenGeeks CEO Interview (dofollow)
Bhushan
August 8, 2012 at 5:56 am
Hey Mitz,
(dofollow)
Great post,
video is too good on affiliate links so this determine a good theory for a bloggers special newbie are waiting for that.I appreciate this post.
Bhushan
Bhushan recently posted..School Management Software System
Mike Howg
August 8, 2012 at 4:45 am
Thanks for the great article. I have been looking at doing this on my own blog so this is a really big help. Hopefully it gets more people to click on my affiliate links.
Mike Howg recently posted..BlogPunch is a CommentLuv Enabled Blog