Every day I browse the web and find sites with affiliate links that are uncloaked. It puzzles me quite a bit. Usually I move on, chuckle to myself, and continue to be meticulous about my affiliate link handling and onsite usage.
But today is different, today I’m going to give back to all my fellow affiliates and SEOs with an easy to follow tutorial on how to cloak affiliate links right in your WordPress admin. A method so easy that there is absolutely no excuse for having an uncloaked link much less a raw affiliate link anywhere on a site you’re trying to rank.
If you have raw links, I beg you, after reading this please go cloak them immediately.
My method is simple and easy to execute. It can very easily be used to train a VA so they can go monetize sites for you. Which is a nice bonus.
Without attempting to go into the theory behind affiliate link cloaking, SEO, and what Google can and can not see, I have concluded that this is the best method out there for getting it done in a manner that should be an industry standard.
There are two pieces to the affiliate link cloaking puzzle and all are handled via plugin in WordPress.
Let’s Cloak Some Affiliate Links
There are three main elements to proper affiliate link implementation.
1. Modify our robots.txt file to disallow a specific subfolder where our affiliate links will reside.
2. Use WordPress redirection plugin to create 302 redirects.
3. Parse links with a rel=”nofollow” tag.
Part 1. Hopefully you know your way around FTP, you will be modifying your existing or creating a new robots.txt with the following line.
User-agent: *
Disallow: /subfolder/
Just simply type in whatever folder name you choose in place of “/subfolder/” and Google will now be dissuaded from crawling or indexing that folder.
If you don’t like FTP, then there is a plugin that will save you.
The plugin will create a robots.txt file for you if you do not already have one. If you do have one already and are using SEO Yoast for example, then you can modify the file within the yoast admin. It’s under the “edit files” tab.
Here are some suggested directory names brainstormed via Twitter.
/go/ /jump/ /download/ /likes/ /loves/ /recommends/ /r/ /visit/ /out/ /p/ /dl/ /refer/ /partner/ /ext/
Then from the smart asses.
/billstopay/ /pleaseconvert/ /makemerich/ /bob/ /mattcutts/ /showmethemoney/ /cashcashcashfuckyeah/ /pleasedontcrawltheselinks/ /plzbuy/ /ineednewshoes/ /hurryupandbuyalready/
Part 2. Now that the important part is out of the way it’s redirect time.
Start by installing WordPress Redirection Plugin. This is what we will be using to handle the redirects.
Chances are you have used redirection plugin before, but you probably haven’t set 302 redirects.
First create the redirect using the folder we just disallowed and whatever you’d like to name the link.
/subfolder/ProductName
Easy right? Now after you make the redirect, click the drop down and change the HTTP code from the default “301” to a “302”.
If you’d like to take a look at the HTTP status code definitions then go here.
Why 302? Because we don’t want to give Google’s dumbass any chance to pass authority through that affiliate link.
News flash, Google doesn’t like affiliates, especially affiliates who spam rankings. So get your game tight and cloak those damn links, don’t give them any easy wins.
And if you were wondering about 302 vs 307 redirects for affiliate links, I might I have this one figured out (this puzzled me). So here is the first sentence of the definition from W3.org.
302: The requested resource resides temporarily under a different URI
307: The requested resource resides temporarily under a different URI
Yeah, hrmmm. The only difference I can see is a 302 redirect is HTTP 1.0 compatible and 307s are only HTTP 1.1 compatible. Yup, I’m just as lost as you are. Well Yoast says go with 302 so that’s what we’ll do.
Also in redirection plugin setting make sure to turn off the 404 logs to avoid any problems with log build ups..
It’s Video Time Kids
Tweetsourcing on the Affiliate Link Cloaking Best Practice:
Yup, just as I thought. Thanks for backing me up Krystian.
@IMJacobKing i nofollow and link to redirects and 302 via htaccess and robots.txt out the folder of the redirects. I know, paranoid.
— Krystian Szastok (@krystianszastok) September 19, 2013
A bit more advanced method, not really sure what this means.
@IMJacobKing href to JavaScript array and js script blocked via robots.txt
— Giuseppe Pastore (@Zen2Seo) September 19, 2013
And another play.
@IMJacobKing @krystianszastok I often use redirs through meta-refresh – as a bonus double meta-refresh drops referrer which can be handy.
— Chaos SEO (@ChaosSEO) September 19, 2013
Paid Solutions?
There are some paid plugins out there for managing affiliates links that offer way more functions but they are for bigger sites mainly.
PrettyLinkPro – This guy has a ton of features. There are 7 different redirect types alone including javascript and meta refresh redirects.
ThirstyAffiliates – ThirstyAffiliats is quite similar to PrettyLinksPro, compare them side by side to get a better idea of the differences.
LinkTrackr – This is more of an affiliate link management/link tracking service.
They also offer free versions in which you can handle the simple cloaking redirects and some of the advanced redirects. But remember they will not edit your robots.txt file for you!! Google indexes all kinds of dumb shit so we need to make sure that doesn’t happen with our affiliate link urls.
Final Thoughts:
The term “cloaking” affiliate links might be a bit misleading so we’ll assume that Google still crawls and identifies affiliate links set up in this manner.
Sure there are plenty of other sneaky ways to hide affiliate links from Google but I don’t recommend playing with them unless you know what you’re doing.
Good sites have affiliate links too, so don’t get the wrong idea, they just know the “right” way to set them up. Clean, user friendly, and signalling Google and SEs to disregard them. Now go have an affiliate link dropping extravaganza and don’t forget to nofollow those bastards.
Keaton says
Good stuff Jacob! It’s funny because I have seen affiliate links on your site and others be redirected and I actually tried to set it up yesterday where my affiliate links would do the same….but I couldn’t get it to work. Now I see that I was going about it the entirely wrong way. I thought that sites were doing this just so the affiliate link ID’s wouldn’t get stolen, but I had no clue it could be affecting rankings. Thanks for this tip and keep up the good work!
Jacob King says
Glad it helped Keaton. ABC – Always Be Cloaking
Jafeer says
This one tUtorial was I asked you about, months before, Easyazone does well fro amazon link cloaking
Malc Simmonds says
Thx for that Jacob :) I realise that half my aff links are not nofollow – doh! It’s obvious when you say it…
Also did not have my redirect folder in robots.txt – now fixed.
Nice to know that when I am making my $15,000 a month it won’t be eaten into by link juice leakage. :)
Malc
Jacob King says
Simply steps that pay off big.
Hans says
Hi Jacob,
Thanks for the instructions. Do you have an idea why I can’t use more than one cloacked link on a page with one subfolder? I get everytime the following message when clicking on it http:// www. mywebsite. com/subfolder/%E2%80%8B/product
Jacob King says
Hey Hans, I really couldn’t say without actually looking at it.
Nick says
Nice. I have either been too lazy or used an affilaite cloaking plugin, but its clunky and you are never 100% sure if its working properly.
Its good to learn how to do it manually and with some added theory to boot. Have set your method up on one site to test it and works a treat. Clean and useful for 301’s too.
The only issue so far is that I have a couple of amazon links that use a county link localizer which cant be cloaked as the plugin wont see them. So I either take a traffic hit by cloaking and sticking to one country, or leave them naked with their nuts out.
Any thoughts?
Jacob King says
Hrmm, not exactly sure about the Amazon thing.
Before publishing this post though I did get some opinions on the affiliate link cloaking plugin. The consensus was it’s a complete bloated piece of shit. Which gave me the motivation to publish this.
Nick says
No worries. I’ll work it out.
Yeah, I agree. I hate bloated plugins.
Eymard Siojo says
Using this technique, it can still pass the refs that tracks using cookies?
And it will not be a problem with google or anything?|
Nice tutorial. I just did it with my sites. :D
Jacob King says
It should, I don’t see why not. If you have added the proper markup to the links.
Eymard Siojo says
Also about the amazon sites? You do this too? and having no problems?
Nick Cavarretta says
Why not just use pretty links for wordpress?
Jacob King says
You could, but need to stop the robots form crawling the subfolder still.
I discussed this with my buddy and he advocated the WordPress redirection plugin for its badassness. Also pretty links has a bunch of paid features and what not, I wanted to keep it as simple as possible. Something you could pass off to a VA and have them go monetize a site for you with properly cloaked links.
Akhtar says
Pretty Links is good plugin but not working in latest WP 3.8, I tried on my site it installed success but when access the Pretty dashboard page always showed me video overlap on page, then I add link then again same problem, I don’t know how manage the links after add the new links :)
Jacob King says
No shit? Well they better get their game tight.
Mike says
Does google see your affiliate links as “internal links” more or less then when you do this? My rankings fall like ASS when I use affiliate links but not with Adsense… Its like the same thing more or less.
side note, I was having some very large sites stealing my content on my blogs and setting up RSS feeds to auto post and my content was getting indexed on their site before mine. They linked to my site but it was a cloaked link to look as if it were “internal” to google. Setup in the same manner you do here. Those fucks! So for months I was posting “duplicate content” just because their HUGE site was getting indexation faster.
Long story short, does Google see your affiliate links as internal or actual external.
Jacob King says
Damn I might have to call Cutts himself for that one, lol.
I assume they are sophisticated enough to identify aff links even when cloaked in this manner. But a raw link you might as well put up a sign that says I’m trying to make money.
That content theft is a problem, there are measures around it.
Did you have credit links embedded in your RSS feed? That’s a start if you didn’t.
If I had to guess Google sees them as a cloaked affiliate link honestly. But from a UX standpoint which they respect it’s the best method, can’t argue with that. I wouldn’t over think it, just make this a best practice and you’re golden.
Paul says
First off, my compliments for this blog..fantastic articles! I have the Pretty Link Pro version but strangely enough there is no option to 302 a link. There is an option to 301, 307 and there is also an option to cloak the link. What would you do in this case?
Jacob King says
Thanks Paul, 307 is fine, basically the same thing as a 302.
Paul says
Thanks Jacob, I know you can’t be sure about this but what do you think about the longer term risk of 307 my affiliate links? I’m asking because for the site I’m talking about I have employees and all and I want to stay on the safe side as much as possible. Any thoughts about this?
Jacob King says
From a safety standpoint I don’t think a 302 vs 307 will have an impact.
If pretty links sets that default they have definitely put some thought into it.
See this article from Joost – http://yoast.com/cloak-affiliate-links/
He recommends 302 and the actual difference between the two redirects is minimal.
From an SEO standpoint I don’t think there is a difference. I would choose 302 or 307 over a 301 though as a 301 signals a permanent url move.
Tolga says
Hi Jacob,
Great tutorial.
But there is a big question in my mind about amazon affiliate links :(
I will start amazon affiliate sites.But with the newest update there are many bad news about deindexing amazon affiliate websites.
How should redirect/cloak amazon affiliate links?
I read Amazon TOS but couldn’t understand the issue about affiliate link cloaking :(
See you again
Jacob King says
Cloak them the same way as outlined in this tutorial. Simple as that.
I’m not positive about the terms, but it should be fine.
ZED says
Based on the TOS from Amazon they don’t allow any form of link cloaking. It be interested to see if there is a way around this…
ZED says
Hi Jacob, great write up and thanks for sharing. I’m trying to understand how to best cloak links in the description area of my Youtube vids so I can direct traffic to my blog’s sales/squeeze page (without getting penalized). Could you please shed some light as to the best approach that you would use to do this successfully?
Obviously just shortening the URL with a URL shortner service wouldn’t cut it, right? In your recent newsletter you talked about Backlinko’s vid for the Bluehost coupon on Youtube. Looking at his link, it’s a URL shortner service that he’s using, but the link redirects just to the normal bluehost URL (with no affiliate link in sight).
This is what I’m trying to achieve.
Cheers man!
Jacob King says
Either drop a direct link, a url shortened link, or a redirect on your domain to the squeeze page.
I think you might be over thinking it a bit. The link in Brian’s video is most definitely redirecting through an affiliate link.
Jguiss says
I use cloacking on my affiliate links since long time on a wordpress blog, but i moved from ultimate SEO to Yoast SEO so i loose all my previous cloacked links ! So i decide to buy a new domain and to install Yourls (to shorten URLs), so now i can paste my affiliate links on many websites and i can track the best referers across all my websites :) But, as a parano man, i think Google will identify fastly that all website using cloacking are for hide their affiliate links… because i didn’t saw another use of cloacking links.
Guy says
Fantastic post Jacob, thanks. I would never have thought of blocking the nosey little critters from the folder. I’m going to get on it right now.
And the picture of Matt Cutts made me cry with laughter.
Cheers
Jacob King says
Ha thanks Guy, didn’t get as many laughs out of that as expected.
Melodye Lorrayne says
Thanks so much for this. I have now added a robots.txt file to 2 of my sites. Now here is wher I have a problem. I was just going to use a link cloaking plugin for the simplicity but I see that even though I have the /likes/affiliate-link url, it STILL goes to the target page and shows my clickbank hop id in the address bar.
Is there any way to NOT have my Clickbank hop id show up in the target address bar after redirection?
Thanks
Jacob King says
Hey Melodye, there is no way to get around this that I know of. The hop id is always there after the click. What I’ve done is just use a hop id that you wouldn’t notice.
Like “ajax” or something lol. Then they’ll think it’s part of the url string.
Noob tuned in says
Zo to be clear in the map Likes you upload nothing? Only use it in the affiliate url of the redirect plugin and thats it ?
Jacob King says
The map likes? Not sure what you mean, we are just putting that line in our robots.txt do block Google from indexing and crawling the affiliate links.
Zach says
Awesome tutorial!
I’ve been using the redirection plugin for WordPress for a while now. The only part I don’t like about it is that you can only see so many redirects at one time. I would love to be able to export these redirects so I can do some analysis. You run into this issue?
Jacob King says
Hey Zach, nah I haven’t but this blog is startting to get a bit cluttered in that department. I actually broke and picked up Thirsty affiliates recently for the forum auto linker, been working well and helps manage things way better. Also auto insert the G analytics onclick stuff which is cool.
Matthew Neer says
Hey Jacob,
First off, badass tutorial man. Thanks for the tips on this. I will def stick to the easy way and use Pretty Link. However, I did wanna know if pretty link blocks the robots.txt file when you select nofollow?
Also, how do you do that sexy floating optin on your sidebar? Is that Gravity Forms?
Thanks amigo,
Matthew
Jacob King says
Hey Matthew, no, pretty links will not modify your robots.txt file. You will need to manually place that line and save it.
Disallow: /folder/
And it’s floating social bar, enjoy – http://wordpress.org/plugins/floating-social-bar/
Matthew Neer says
Nice! Thanks for the tip! I’ll have to hook that up.
As for the plugin, I was not talking about the social media bar at the top. I use digg digg for that.
Instead, I was referring to the optin box on the right hand side in your sidebar called “The SEO Insider”.
How do you float that?
Thanks,
Matthew
Jacob King says
Hey Matthew, using fixed widget Q2W3 plugin for WordPress. Check it out here.
Matthew Neer says
Thanks! You da man! :)
Jonathan says
Hello Jacob,
Great tutorial. I use Pretty Link, but Google is indexing those links now. So I want to place those links in a folder and add that to my robots.txt file. The problem is that I don’t know exactly how to do that.
Should I just create a link, like http://www.domain.com/go/outboundlink, and add Disallow /go/ in my robots.txt?
Or do I have to create a folder (go) and place this in my root and then add the link http://www.domain.com/go/outboundlink to it?
Jacob King says
You are correct with the first one, you do not need to create a physical folder. Just disallow that directory and you’re good to go.
Jonathan says
Hello Jacob,
Great tutorial. I use Pretty Link, but Google is indexing those links now. So I want to place those links in a folder and add that to my robots.txt file. The problem is that I don’t know exactly how to do that.
Should I just create a link, like http://www.domain(.)com/go/outboundlink, and add Disallow /go/ in my robots.txt?
Or do I have to create a folder (go) and place this in my root and then add the link http://www.domain(.)com/go/outboundlink to it?
Harley says
Hi, I got here looking for cloaking techniques, this post left me with many questions though:
1. this is a tutorial that’s relevant only for people using wordpress? what if I don’t use it? can you explain what does this WP plugin do, and how can I emulate it?
2. Maybe I’m missing something but where’s the part 3 explanation on your post? can you explain what’s a rel=”nofollow”? how does that relate to the META tag –
?
3. I didn’t how do you decide if the server would act by a 301 or a 302, and what difference does it make on google’s end?
4. is there a good place to read about the java and htaccess techniques mentioned here?
Thanks!
Jacob King says
Thanks for the questions.
1. The tutorial is a quick and easy set up for WordPress users but the methodology remains the same. A Robots.txt file can be used regardless of web platform along with a 302 redirect, which technically is all we’re doing but with the help of a wp plugin.
2. The rel=”nofollow” is just an extra precaution when parsing the affiliate link on page, it doesn’t relate to a meta tag, it’s place in the html anchor text.
3. The general consensus and my common sense tells me to use a 302 redirect as this is a “temporary redirect” vs a permanent 301.
4. Nothing specific, just a lmgtfy on that one.
Hope that helps!
Peter says
I currently have my folder hidden in robots.txt, but I have my links set up as a 301 redirect, but I had heard that since many affiliate links from the affiliate networks are set up as a 302 — that if we have our folder redirecting from a 301 to a 302, this can be a bad thing, — meaning that our cookie may be dropped, and we may not get credit. So, I think I feel more comfortable changing to a 302 redirect…… Just would like to get your opinion and expert advice on my dilemma!
And do you think this will look bad to Google if I change my site affiliate links from 301(permanent) -to- a 302(temporary) ?
The reason for my concern is I have one affiliate site that I strongly feel I may be losing commissions on… like 1.300 click-throughs from my site to order pages with no sales through an image with an order button —- so these people are ready to buy.
And I got one twitter account that I have close to 35,000 followers on this account, and I don’t ever see any opt-ins, sales, etc… (probably in the last 6 Months at least) and I provide a ton of value in my tweets with quotes, blog posts, free self-help videos, etc… (and I’ve been active in there almost every day.)
So, I feel like something fishy is going on, but I can’t figure it out. I’ve worked so hard for so many years, and I just feel like quitting now. Most people would have quit already.
So, I’d appreciate any advice, or if you know of any nefarious activity ocurring in the affiliate industry that may be causing this?
Thanks in advance,
Peter
Jacob King says
Hey Peter, I don’t think there is any security difference between a 302 vs a 301. I even checked with a couple friends.
This doesn’t mean something fishy isn’t going on, I would continue to investigate if you know things are not adding up.
Peter says
Hey Jacob,
I believe I heard somewhere that if we use 302 wit our affiliate links, then this is prone to link hijacking, as opposed to using a 301…. so I don’t know how much truth there is to that — nor so I know exactly what Link Hijacking is? And if I should be worried about it?
Would you be kind enough to elaborate on this?
Thanks in advance,
Peter
Jacob King says
Well I never have been, lemme double check with a buddy on this.
James says
Does following this method mask the the link? Should the the url bar show for example likes/whateverlinkname instead of the full affiliate link?
If not how do you know if this worked?
Sorry for the noob questions.
Jacob King says
It should spit you throw the affiliate link which takes you to the publisher’s site.
Jason says
Thanks for that Jacob,
I’ve heard that redirection is quite a heavy resource how would you say that this redirection plugin compares to using simpleurl’s and the same robots disallow method?
Tried using Prettylink but had a few issues so looking for an alternative. Id like to go the no plugin route as per Joosts method but cant seem to get it working with WordPress.
Really looking for lightest option
Andrew Rezk says
Thanks Jacob,
Your post has helped me alot, i was thinking to use pretty links plugin however i’ve heard that such affiliate plugins may cause alot of issues and consume database specially when you have blog with +1000 posts. i’m afraid that depending on a single plugin for cloaking and redirects can cause alot of headache and problems in the future as for any reasons the plugin may stop working or cause issues :/
So i think an online cloaking & tracking platform outside wordpress like Linktrackr would be the ideal solution. What do you think?
Jacob King says
Yeah if you have a very large site then some sort of management tool is going to be key. No recommendation there, I have pretty links for my forum tho.
jackie says
I have done everything as you have asked to do but it does not seem to be redirecting.
Under modules in Apache I have the message Disabled: enter the location of an .htaccess file for this to be valid is this the problem and how do I fix it.
You have to excuse me cos all of this is like Greek to me.
Thanks
Jackie
Jacob King says
Hrmm, I’m really not sure on that one. Try hitting the WP forums. Sorry about that!
jackie says
I have done everything as you have asked to do but it does not seem to be redirecting.
Under modules in Apache I have the message Disabled: enter the location of an .htaccess file for this to be valid is this the problem and how do I fix it. When I click on the target url it just goes to the same url that is in the target url box.
You have to excuse me cos all of this is like Greek to me.
Thanks
Jackie
jackiebk says
Hey Jacob
how do I create a subfolder where our affiliate links will reside?
Peter says
If I have an Amazon a-store on my site do my affiliate links appear to the google bots?
Jacob King says
Not sure, even with the disallow line that piece of shit Google bot can most likely differentiate an aff link, it’s just the cleanest legit way to handle them of any alternatives.
Joan Altres says
Not trying to toot our horn too much here, but we have a decent link cloaker called Easy Link Cloaker that is a one-click install php script. We also made a simple plugin that gives WordPress users the ability to load up the ELC admin inside their WP dashboard in an iFrame. Makes it convenient for WP users who do a lot of work in the back without loading WP with another resource eater. Simple plugin.
We use WordPress for all of our sites, but we like keeping our link cloaker as a script. What’s cool about it is that after the install, you can copy/paste the Easy Link Cloaker admin folder into whatever directory you want and start using it – rename it, copy it multiple times into as many directories as you like, and it works, period. No need for updates because of WP changing all the time.
It tracks the clicks for all links and has an option to immediately share each link to your social networks after creation. Full management and you can create non-cloaked links with it as well (url redirect links instead of full cloaking links).
Anyhow, I guess I did toot the horn a bit much here. lol. Apologies for that. Thanks.
Jacob King says
Sweet bro.
Jeremy says
Hi Jacob,
I was reading through your post and found it extremely informative. However, when you use redirects on your website, doesn’t it kind of make your website load slow.
Thank you
Jeremy
Jacob King says
Negative sir, most popular sites are using some sort of redirects at one point. If you’re using tons of redirects and setting them up incorrectly, it might slight down your site. But with redirection and the apache logs turned off you should be golden.
Brandon says
Thanks for the useful post! Will this also work with adwords? I want to run some ad campaigns but google doesn’t allow me to point to an affiliate site. Any tips or suggestions?
Jacob King says
Not sure about that, if they don’t allow the direct aff link then prolly not on the redirect.
David Law says
What happened to part 3?
3. Parse links with a rel=”nofollow” tag.
I usually use a stand alone PHP redirection script on another site and use javascript and CSS to generate the links (cloaked links). The stand alone script is cumbersome (it’s OLD) to use and only generates 301s, so looking for a new technique that doesn’t waste link benefit (my current setup doesn’t waste link benefit).
My current setup users see a text link with a link /tracking/track.php?id=16 and Google only sees the anchor text (no link) since the link is generated using javascript and CSS. Nofollow links are also converted to the javascript/CSS link format (Google sees the anchor text, no link), but the URL isn’t changed for users.
David
Jacob King says
Haha, first person to notice that. Thanks David!
Jenny says
I am using the redirection plugin but I seem to be getting a whole lot of 404 error pages when I click on the source url. Any reason for this and what is the remedy.
Thanks
Jenny
Jacob King says
Hrmm, not sure. Make sure the links are parsed correctly and you set up the redirects correctly.
The source for example, you just start from the trailing /
If I want jacobking.com/likes/product, I would just type
Source: likes/product
Target: http://www.clickmyaffiliatelink.com
Mathew says
I’m a bit confused,the easiest way for me to do this is to buy another domain like on godaddy and use forwarding the domain to my affiliate link.The domain name will be adding “official+product” and cloak it by using 301 or 302 redirect without masking to my affiliate link,its it right what i’m doing?
Jacob King says
No not another domain, look at the link in this post to pretty links.
https://www.jacobking.com/likes/Prettylinkpro
It’s on my domain, in the folder /likes/
Then check my robots.txt file, you’ll see I have disallowed hat folder.
Luca says
Hey Jacob,
Great guide! I’m not really good with all this robots.txt files etc however, I was wondering is there some way to check that the affiliate links are cloaked correctly?
I have cloaked 3 affiliate links on this page: http://meditationtechniqueforbeginners.com/best-books-meditation/ (The links are the sub-headings). Although they are not no-follow yet.
I’m not sure whether I am doing it write or wrong, can you let me know please?
Jacob King says
Hrmm, I see the amazon links but they don’t appear to be redirected at all. They seem to work fine but they are just direct links.
Luca says
That’s what is really weird. I went and downloaded the plugin so I could edit the robots.txt file. I then added the Disallow: /likes/ folder
I then downloaded the redirect plugin, found my affiliate links, put them in the redirection plugin and made them 302 redirects.
I’m not understanding why they arn’t cloaked. :l
Cheers, Luca
Luca says
Yeah it seems pretty strange. One of my affiliate links is for a yoga program so I made the Source URL: /likes/YogaforWeightLoss
On the post is still comes up as the affiliate link but when I type in http://meditationtechniqueforbeginners.com/likes/YogaforWeightLoss it takes me to the affiliate page.
What is wrong with this and can you help me please?
Jacob King says
Hrmm not sure man, I’d have to login to your wp admin to tell. Try finding some geek on wordpress.org to help you.
Jeremy says
Hi Jacob,
When I asked you about whether redirects would slow down a website, your answer was
” Negative sir, most popular sites are using some sort of redirects at one point. If you’re using tons of redirects and setting them up incorrectly, it might slight down your site. But with redirection and the apache logs turned off you should be golden.”
Since I do not understand what turning off apache logs I asked my website provider how do I do it. The reply was “you actually wouldn’t be able to turn off apache logs as they’re a function of the apache itself which you don’t have access to”
So what next?
Thanks
Jacob King says
It’s in the plugin settings mayne – https://www.jacobking.com/wp-content/uploads/2014/03/Screen-shot-2014-03-10-at-10.36.39-AM.png
Jafeer says
Hey Jacob
Any idea how to mask links to G bots using Ajax or Iframe ?
Jacob King says
Sorry, I do not.
Jason says
Hi Jacob, I have read so many conflicting stories on cloaking I was wondering if cloaking is still the way to go. I have a site and am using raw links and am ranking fine, however, I am looking to add another product which has a really long and ugly URL.
I’ve read that affiliate link cloaking = losing rankings.
Can you let me know if this is still safe to do without any Google slaps?
Thanks so much in advance!
Jacob King says
No prob, this really isn’t cloaking in the traditional sense, it’s just a clean way of handling links that tells Google to basically leave them alone or stay away with the crawl.
There is no way this method would hurt rankings over dropping raw affiliate links, I never drop raw affiliate links on any of my sites, ever.
I also advise every client do the same for my audit business, Auditwp.com
There really isn’t anything manipulative going on here, it’s just a smart way to keep G away from content they have no point crawling and indexing such as affiliate links.
Michael says
When you say add links to your “likes” folder what do you mean ?
Does the ‘redirection’ plugin do this for you once the ‘likes’ folder is created or do you need to do something else?
Such as create a new folder for each product your linking to and if so what do you then put in that folder.
I must be missing something coz I followed instructions as given (several times) and isn’t working.
Jacob King says
You’re over complicating it, when you create the redirect in redirection, just use the subfolder.
.com/likes/affiliate-offer
vs
.com/affiliate-offer
Now technically the link resides in that subfolder.
Ashley Hauck says
This is very useful! I just started cloaking my links this morning. Thank you so much!
jish says
I have a question
If do 302 redirect, will amazon ban your account?
Did Amazon prohibits cloak?
Jacob King says
Nah, it’s not really a “cloak” that Amazon would be after. We’re just keeping our links neat and telling Google to leave them alone.
Chafik says
Hi,
If I use Pretty link plugin, where can i find the subfolder to disallow it in the robots.txt ?
Thanks,
PS: Sorry for my english !
Jacob King says
There is no subfolder, you need to modify your robots.txt file.
We are simply setting the affiliate links in a subfolder instead of directly on the root domain then disallowing that folder.
Chafik@Ebooks-Gagnants.biz says
Ok, thanks for the answer. :)
Bye
Paul says
does a plugin like pretty links work ok??
Jacob King says
Yes it sure does, just need to modify your robots.txt file disallowing the folder path you’re using.
Jas says
Sorry to be dumb you’ve answered the same question twice above and I still don’t get it.
I’m using Pretty Links also so If I put this is robobt.txt will this work?
Disallow: /wp-content/plugins/pretty-link
Jacob King says
You’re over thinking this.
Add a new link like this:
https://www.jacobking.com/wp-content/uploads/2014/07/Screen-Shot-2014-07-05-at-10.22.27-AM.png
Now take a peak at my robots.txt file and you’ll see I’ve blocked that folder – https://www.jacobking.com/robots.txt
J Hunter says
Another option is to set up a shortlink domain and have all your affiliate links a short link. Example we purchased the domain name “ityurl.com” and we use tracking not just for affiliate links, but actually all links so we can monitor for our clients clicks they receive with a pretty little chart using a php program called “YOURLS” (it’s opensource).
Anyways, it’s just another nice option with absolutely no repercussions to the Google eyes.
Thanks for this though, good stuff.
J Hunter
Phillip Dumont says
I’ve used this method on my own site to cloak my links, however one disadvantage I’ve found too using this method is that plugins such as Amazon Affiliate Link Globalizer don’t work. Is there any similar plugin that localizes amazon links that will work with cloaked links that use this method. I know of plugins such as easy azon that I have installed that can cloak and localize links, however the problem I have with those is that you can’t embed the shortcodes into images.
Zeeshan says
How to change 301 redirict to 302 ? help me pretty please
screen shot http://prntscr.com/45nj1t
Jacob King says
Drop down the settings for the link and change it to a 302.
handle says
Whats with the video on cloaking. Didn’t know I’d need a 10 million power scope to actually see it!!
THANKS FOR NOTHING!!!
Jacob King says
Haha still learning, I’ll step it up on the next one just for you bud.
Nico says
Hi i’m new at this and i have a question.
Isn’t this the exact thing Google specifically tells us not to do on webmasters guidelines?
Jacob King says
Not sure, never read em.
Nico says
Wow…That’s like teaching religion without reading the bible.
Jacob King says
Lol you’re kidding right?
It’s more like teaching the art of war and using a rule book that the enemy wrote for you.
John says
I did everything you suggested up there and it works great! Thanks for the insight.
So, what about the “3. Parse links with a rel=”nofollow” tag.”? You missed to write this segment.
Should we enter the nofolllow tag manually on each link or is there a way to automate this action?
Jacob King says
Oh lol, yeah you have to add that manually.
John says
Thanks!
pptlady says
Hi Jacob – thanks for the tutorial. I can’t seem to find where to change to 302 in Redirect plugin. At the moment, mine only allows for 301 code, and when I click on the redirect link (which works), the url then defaults back to the affiliate link. Here is the page – http://kidspuzzlesonline.com/puzzles-for-kids/sudoku-for-kids/. And the affiliate link I wanted to hide is the Sudoku For Kids book on the right sidebar. Any thoughts? Thanks much!
Jacob King says
Click the link in redirection and some settings will drop down, switch it to 302 there. Yup sidebar, looks good.
susanann says
There are a number of WP redirect plugins listed…so not sure which one I should use…I did find one that simply says “Redirection” 2.3.6. for 301 and 404 redirects…some others are Stallion WP Redirect and SEO Redirection plugin…many thanks for your info…I”m a little short on techie smarts.
susanann says
Ok I just watched your video and got the answer to my question…thanks again.
Jacob King says
Great!
susanann says
oh dear I am not having any luck with redirecting my links…where does the
rel=”nofollow” go please …in the.txt file? or after the link url?
Also wondering if some of the other plugins I have installed are interfering…possibly SEO Power and SEO smartlinks….kinda lost…many thanks for any help.Just having a helleva time trying to cloak these Aff links.
Also my SEO All in One plugin has a robots.txt file which is what I used and I’m assuming that is ok?
Jacob King says
you add the nofollow tag when you physically parse the link into your post or page content.
uo should have one single robots file, visit your site, domain.com/robots.txt and check it out, the line you added for blocking the subfolder where our affiliate links go should be there.
Astrid says
Hi Jacob,
Thanks for the detailed post and video. I have been looking for anything with Yoast’s cloacking article and this is the closest unless I am missing something. Thank you!
Have you seen the update on Yoast’s link cloaking post? He is now using 3 files to do all of this and by hosting your own redirects for speed and well, to have more control over them, etc…
After trying for months and jumping hoops I can’t get it this to work at all. I have created my (out/likes etc.. ) folder, uploaded the files, and attempted to set up the files unsuccessfully.
If you or someone has any tips on how to actually set up the redirects in the file I’d appreciate it immensely.
Thanks in advance
Jacob King says
You’re over complicating it, 302 redirect, disallow the folder in robots, good to go.
Marty Rogers says
Thanks for this Jacob – there are so many overcomplicated scripts out there that help with this, but this method is by far the best and easiest to manage.
Jacob King says
Well thank you, funny thing is look at the comments, most people are still confused.
Marty Rogers says
That’s true – maybe some of them are commenting before even trying it as it’s not particularly difficult. Ha!
Bill Byrnell says
Hi Jacob
Thanks for sharing this with us. Can you show an example of where you place the rel=no follow tag please.
I did the URL changes in the wp redirection plugin first.My Target URL is my affiliate link and my Source URL is my new link such as /likes/eyeglasses
I have my robots.text file with my likes folder in it already.
Thanks for your help…..Bill
Jacob King says
It’s within the html link, href=”” rel=”nofollow”
Maria says
Jacob,
I have tried GoCodes and LinkHopper plugins that do this, but I turned it off, my main concern was that redirect was very slow, it took almost 15 seconds to take a visitor to affiliate landing page. What might be the problem ? Shared hosting plan on Hostgator together with CloudFlare ?
I turned it off almost a year ago and now just use NOFOLLOW with raw long affil links…
Please comment I need your advise.
Jacob King says
Yeah that could def slow things down, have you tried just using redirection plugin and not those plugins you mentioned? Also without cloudflare?
Mark says
Just wondering, wouldn’t it be better just to use something like pretty link? Love to hear your thoughts…
Jacob King says
Sure you could, but this is a paid plugin for full functionality. Secondly it doesn’t modify your robots.txt file for you so you’ll have to do this also.
Marc says
Hi J.
First 2 steps where good to follow for a newbie like me.
But you didn’t wrote a step 3 “NoFollow”. So that was the tricky part for me.
I saw your comment in another response on this but I still didn’t get it. I than checked you code with your aff links and understood what you mean :-)
Many thanks, Marc
Bee says
Hi Jacob,
Is best practice – 302 for affiliate links & 301 for non affiliate links?
Cheers,
Ben
Jacob King says
Yes definitely, we don’t ant to be telling Goog of a permanent redirect to an aff link, not like it’s a huge deal, but to be perfect with things, 302 is best.
Rob Holiday says
Wow this is exactly what I was looking for. Thanks for sharing this strategy.
I write about sports betting and its always a pain in the ass to get my affiliate links to the various books or resources included.
Question – Do you think this would work for Amazon Kindle Ebooks – if i put the link to redirect from my site to the sports book – to include the tracking cookie?
Thanks again for the awesome post.
Rob
Jacob King says
Sure it should work just fine unless the platform crawls links and stops you from using redirects.
Ridha says
Hi Jacob, glad to see you have answering many questions here.
I have found another references from marismith.com/how-to-make-a-redirect-link/. He use an html file to redirect the link without the WordPress redirection plugin. I guess it is quite easy too. Just make index.html page on each affiliate link sub folder.
1. What do you think about his method?
2. You have write this two years ago, do you think it is still work in 2015? :D
Thank you.
Best
ridha
Jacob King says
Yup still working just fine in 2015 and will be for the foreseeable future :-)
Mary says
Jacob –
Thanks so much for this tutorial – I’ve used it quite successfully up until now.
However, it looks like the Redirection plugin got updated recently, and now I don’t see a drop-down menu for the HTTP field to change it to a 302 from a 301.
Can you lend some guidance on how to work around this (or am I simply not seeing it somewhere?)
Thanks again for your time and assistance.
Mary
Jacob King says
It’s there, just kinda tucked away.
Mary says
Oh I found it – the little rectangle below the source URL – have to click on it now to open it.
Thanks so much for your help, Jacob :)
wpguide says
So this is really similar to how Yoast advocates link cloaking in his article, except you’re relying on the Redirection plugin to make the redirects easier to manage. The benefit of his solution is that it doesn’t need to load WordPress first, but I doubt the occasional organic visitor is going to really notice a difference. Probably a different story if sending lots of visitors to the link through paid traffic.
Robin says
Hello,
First of all great post! But for someone reason when I visit the link I’ve made I get the error that its forbidden, dont have permission on the server. I checked the permissions thats good. What could be wrong here?
Thanks in advance!
Tyler says
I actually had an affiliate coupon link indexed for a fairly competitive keyword because I didn’t cloak it.
WPDIV says
Great explanation to cloak links. Awesome article jacob.
Thanks for sharing…
Deepak Eapen says
Hello Jacob,
I was searching for a way to do affiliate link cloaking and i stumbled upon this easy to follow post of yours. It is really a neat and easy way to cloak aff. links. Thanks a lot for your tutorial. I am sure this tutorial will help a lot of affiliate marketers.
Thanks,
Deepak.
Jacob King says
Thanks Deepak, very simple indeed. Lol at some of the comments tho totally not getting it.
jasper says
I use pretty link like and use 307’s for my affiliate links, I also nofollow the link in the plugin.
I have included the relevant disallow stuff to my robots.txt file too.
However my affiliate links are still getting indexed in google.
I thought I would give it some time to see if they get removed from the index but they are still there 6 months later.
It does however say this in the description of the indexed affiliate links in google though “A description for this result is not available because of this site’s robots.txt – learn more.”
How do I remove them completely from the index as these are technically junk pages.
Jacob King says
Well I think it depends on if they got indexed before you implemented the robots.txt, because once Google has indexed the URls the robots won’t necessarily force them to remove them.
Ian Whyte says
Jacob you are still working hard on this nearly 2 years on.
Some simple things I have yet to properly understand
– where do you put /locate your /like/ file on your site.
– what do you put in that file
– how do you cope with several different affiliate links. Do they all go in the one /like/ file
Thanks in advance :)
Jacob King says
I’m using the thirsty affiliates plugin, when you configure it you set the subfolder for it to use. And if you’re just using redirection plugin then simply use that folder when you create the redirect. You don’t need to make an actual folder this way, just specify it in the url path you create.
Yes, they all go in one. If you wanted you could create more than one directory, I just keep it simple here with one.
Ian Whyte says
Yet another query about adding the rel=”nofollow” qualifier
I take it it cannot be done via the link option in the WP visual editor – you have to go into the text version to do it.
Jacob King says
Yes you would need to flip to HTML and manually insert the tag.
Abrar Mohi Shafee says
Hi Jacob,
I know I am late but a question is appearing in my mind. It is that if I 302 redirect affiliate links and disallow the sub-folder using robots.txt, will I still need to add nofollow attribute to each affiliate link where I place it?
We know that 302 redirect doesn’t pass link juice and disallowing the sub-folder restricts googlebots to completely crawl those links. So isn’t those two steps well enough to stop passing link juice and isn’t it safe not having nofollow on them?
This question appeared in my mind because in Yoast’s website, there is an affiliate link in footer to Synthesis where it is 302 redirected and the sub-folder is disallowed in robots.txt, but there is no nofollow tag on it. Joost seems to use it in this use.
So what do you think about it? I’m pretty curious because Google’s Gary Illyes announced that panda is coming within next 2-4 weeks and I’m toughing up my practices.
Best,
Abrar
Jacob King says
I don’t think it’s required by any means, I just add it because why not. It is a bit redundant though. I wouldn’t overthink it :-)
Quinton says
Jacob,
What are your thoughts on bypassing all this link redirect stuff and just installing YOURLS and send all affiliate links to your YOURLS domain? The affiliate URL looks nice and “Pretty” this way as well.
Jacob King says
I’m not familiar with YOURLS, using redirection plugin or safe redirect manager seems like the easiest solution to me.
AJ says
Hi jacob, Great tip…
I want to know if we can publish adsence ads with affiliate ads in the same webpage using this technique.
Jacob King says
Yeah why not, you’re not doing anything sketchy with the links, just making them cleaner and telling search engine to ignore them. Adsense running totally separately from that is fine.
Niro says
Hey Jacob,
I installed the plugin but it seems to have changed a bit.
i can’t find this 302 now and i am wondering if it is the “pass-through” action?
hope you can clarify how to “302” redirect with the plugin now.
thanks
Niro
Niro says
OK got it, just after creating – needed to go and edit the redirect and in the config button there is an option..maybe it’s a good thing to let people know.. some of us are newbiesss :)
Jacob King says
Ah yeah it’s kind of tucked away. It defaults as a 301 so you need to change it for each aff link you add.
Ansar says
Hey Jacob, I just bought Thirsty Affiliates today, been a bit busy changing my links. I’ve left the redirection at 301 because after doing some research it seems 302’s will get treated the same after a period of time. Atleast according to these articles:
https://www.seroundtable.com/google-302-redirects-pass-pagerank-21575.html
https://www.seroundtable.com/google-302-301-permanent-redirect-21045.html
I would take those with a grain of salt, but either way its not a big deal. TA can change them all globally so I will test it later.
Anyway, I just had one quick question: Basically, I’ve removed the thirsty affiliates link sitemap that Yoast generates, as well as put a new robots.txt to disallow the sitemap just in case.
I was wondering whether there is a file or folder that I also need to block access to? I use the standard /recommends/affiliateproduct path, but obviously the folder doesn’t actually exist. Probably a bit noob, but best to be sure.
Thanks man! I didn’t see this article till after I bought it, or I would have sent you a few coffees by getting it through your aff link, oh well next time.
Jacob King says
Hey dude, I use 302s just cuz it makes sense. No need to use a 301 even if Goog says it’s fine. If you’re using the default path of /recommends/ than all you need is:
Disallow: /recommends/
in robots.txt ^^
Erny Peibst says
Hey Jacob,
Awesome post! I have a site that’s 4 months old and is ranking really well. However, whenever I make a post with a naked affiliate link in – that post ranks really low, compared to the rest of the articles on my site (which continue to rank high).
I assume it’s because Google is scrutinizing affiliate pages on new domains?
Thus do you think cloaking affiliate links will help with my rankings?
Jacob King says
No lol
Tarun Rawat says
Hello Jacob
If am doing paid PCC On google,
how does it work, user will come first my website then he click on affiliate link.
else user will redirect automatic
Regard
Jacob King says
Nah you’re overthinking it, just a redirect to an affiliate link that is blocked in robots
Mike says
1. I set up a folder called “recommends”.
2. Robots.txt is set to disallow /recommends.
3. Link on site is wirtten as http://mysite/recommends/whatever.
4. Recommends folder has htaccess: 302 Redirect /recommends/whatever http://www.outside-site/uglyafflinkstring
Is this setup okay?
Jacob King says
I tried to make this clear but now I realize I failed miserably.