These codes are useful for hiding the affiliate links. However, please read the affiliate program terms of service, so that you won’t go against it.
For all except the last way (.htaccess redirect), create the respective file for each affiliate link with the code for the chosen redirect style. Replace ‘http://your-affiliate-link-goes-here’ with the URL of the affiliate link.
For example, if you choose to use the PHP redirect, first create a PHP file. Copy and paste the PHP redirect code into that file. Replace ‘http://your-affiliate-link-goes-here’ with the affiliate link URL.
Every time you want to link to the affiliate link, just link to that file.
You have to create new file for each affiliate link.
HTML redirect
<html>
<head>
<title>HTML Redirect</title>
<meta http-equiv="refresh" content="0; url=http://your-affiliate-link-goes-here">
</head>
<body>
Please wait. Redirecting...
</body>
</html>
PHP redirect
<?php
header("Location: http://your-affiliate-link-goes-here");
?>
ASP redirect
<%@ Language=VBScript %>
<%
Response.AddHeader "Location","http://your-affiliate-link-goes-here"
%>
ASP.NET redirect
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.AddHeader("Location","http://your-affiliate-link-goes-here");
}
</script>
Coldfusion redirect
<.cfheader name=”Location” value=”http://your-affiliate-link-goes-here”>
JSP redirect
<%
response.setHeader( "Location", "http://your-affiliate-link-goes-here" );
response.setHeader( "Connection", "close" );
%>
cgi Perl redirect
$q = new CGI;
print $q->redirect("http://your-affiliate-link-goes-here");
Ruby on Rails redirect
def old_action
redirect_to "http://your-affiliate-link-goes-here"
end
Apache .htaccess on Linux
Add this code to the end of .htaccess file. Replace ‘http://your-affiliate-link-goes-here’ with the affiliate link URL. To have more than one affiliate link, just add another RewriteRule.
RewriteEngine on
RewriteRule ^affliate.php$ http://your-affiliate-link-goes-here [R]
New Acronis True Image Home 2010 is the most reliable and easy in use backup solution. Now with online backup option!
15% Discount Code: FMAATIH2010








The question is WHY would you want to hide the affiliate link? I’m sure there is a good reason, but it escapes me.
Nice Blog Design, whre i can get this theme
kiprams last blog post..Cara Gampang Mengalahkan SEO Master
I design it myself.
Jeff: It is not the matter why we should hide the affiliate links. What important is that we could do it.
Jeff: what would you do if you found the link you’ll be redirect is affiliate link?. that’s the answer for your question.
i don’t remember the name, but there’s a wordpress plugin that can hide the aff links, and it works.
i always use iframe to cloak my affliate link. then i encrypt the code so when they view the source, all they see is just the code.
[...] also has write a nice tutorial on How to Hide affiliate link. You might be interested to read the 9 ways to hide affiliate links tutorial by Selinap. Subscribe to comments Comment | Trackback | Post Tags: affiliate program, [...]
Don’t forget to mention that PHP redirectional scripts work just has good as actual redirect codes.
In some countries certain affiliates like gambling, currency trading, pen pal or mail order bride sites are illegal. So some affiliating with them best not show it. Also, some folks don’t want you to make a profit or may not want any record of them visiting your site, so cut your code off. So many people are paranoid that someone is out there wanting to get their unexciting details. I am sure if you dwell on it, there are other reasons to not let others even know you are in business, maybe your exspouse, guy who claims you owe him money, the guy who always borrows money from you. Yes, I am sure there are reasons to hide just about anything and everything. . .
Why hide. My comments below, but first: using the techniques above, will a code savvy person be able to look at your source code and tell that you are hiding your affiliate I.D.? If so, these are not answers to the question. They show how to hide to the casual visitor, not to someone who really wants to know and would look. Please answer this here, if you will. I would appreciate it very much.
In some countries certain affiliates like gambling, currency trading, pen pal or mail order bride sites and others are illegal. So some affiliating with them best not show it. Also, some folks don’t want you to make a profit or may not want any record of them visiting your site, so cut your code off. So many people are paranoid that someone is out there wanting to get their unexciting details. I am sure if you dwell on it, there are other reasons to not let others even know you are in business, maybe your exspouse, guy who claims you owe him money, the guy who always borrows money from you. Yes, I am sure there are reasons to hide just about anything and everything. . .
Actually, it is not what you should, but what you can do.
A nice share. Thanks btw
I was not clear in my request for help so I ask again.
Is it possible to hide your affiliate link so even a review of the source code will not show you are an affiliate of the company URL on your page/site? I don’t expect a yes, answer, but I know there are some very creative people out there, maybe you, who can work such magic.
Respectfully,
donalton
IMHO, solution number 9, redirect via .htaccess, could be one of the possible solution to your problem.
Thank you Selinap! I am not a webmaster only a website owner with some minor knowledge of HTML . I can do simple edits of my site with Dreamweaver and have a helper who is much better than I am but still no master.
Let me be sure I understand you. I can use solution nine and even if some looks at the source code they cannot tell that I am an affiliate of the companies whose URLs I have listed in the site? I note solution nine refers to Linux. Must I have a Linux system to do this? I have Windows.
Thank you for your valuable time and help!
Respectfully,
donalton
Actually, as long as you are using Apache web server, you can use .htaccess.
i have my domain pointing to my blogspot blog. i want to point my subdomain to the host domains server so that i can host any images or Html files (because of some possible blogspot limitations when it comes to custom domains) that can be accessed through my blog.
my query is if i keep the redirect files with the affiliate links on the sub-domain & the user clicks on one of the affiliate links on the blog (the main domain) then the user will be directed to the sub-domain & from there to my affiliate link.
If i do i simple re-direct (which is what it appears to be in the above- files , correct me if i am wrong) then the affiliate link appears on the address bar.
Even i use frames then the sub-domain would appear in the address bar instead of the main domain which is the site from which the link was clicked.
Is there any way so that the main domain can be made to stay on the top in the address bar & status bars
Also there are a couple of other things i have been searching on the internet for hrs. Would appreciate if anyone could help
1) i included the onmouseover in the html to cloak my affiliate link . On mouse over nothing appears on firefox while it works fine with the IE. But when i click on the link the text hop.clickbank, appears on the status bar of the site it is clicked on. The time it appears for is reduced after assigning my desired status to the onclick event also. But the url completely appears as hop.clickbank in the title & address bar of the window before going to the merchant site. Is there any way to handle this
2) does anyone know whether the 400px restriction is applicable to the header background image in blogger or not because mine is 760px wide although most part is a white background but still the image appers fine at my end & i dont know how the image in the header appear elsewhere & how would the images in the header & the post appear in a higher resolution when the image si increases as i can see my header image
thanks,
mk