Questions? Call (860)407-2687
find us on:


Hide your Affiliate Link Redirect Script ♺

short url:
  • How to Hide your Affiliate Link with Redirect
  • How to Hide your Affiliate Links with Simple PHP Redirect
  • How to Hide your Affiliate Links with a Better PHP Redirect
  • Part One of the PHP Affiliate Link Redirect
  • Part Two of the PHP Affiliate Link Redirect
  • How to Hide your Affiliate Links with Htaccess Redirect
  • Free Tool to Properly Create Htaccess Affiliate Link 301 Redirect
  • How to Hide your Affiliate Links with Javascript Redirect Script - Method #1
  • How to Hide your Affiliate Links with Javascript Redirect Script - Method #2
  • How the Advance Javascript Affiliate Hiding Redirect Code Works
  • Hiding Affiliate Links with Redirect & Seo

How to Hide your Affiliate Link with Redirect

There are several ways to hide your affiliate links with redirect and these include, in order of best method to least best method:

  • PHP redirecting of affiliate links.
  • Htaccess redirecting of affiliate links.
  • Javascript redirecting of affiliate links.

How to Hide your Affiliate Links with Simple PHP Redirect

The simplest and easiest way to create a link redirect using PHP is a simple and short single line of code:

Replace http://www.google.com with whatever web address you wish.

If you want to use this method of php redirect and have there be a pause before the redirect, use the following php code:

Replace google.com with whatever web address you wish.

For either of these to work, the code has to be placed at the top of the page before any other html code. In fact, it is best to just open a blank text file, like notepad, put that line of code, all by itself on the page, and then save the page as a separate web page. The page has to be saved with a .php extension and not .htm or .html.

How to Hide your Affiliate Links with a Better PHP Redirect

This is the ideal way to redirect your affiliate links.

This method involves creating a form with a submit button that is css styled to look like a regular link. When the submit button is click and the form is submitted, php code redirects the current page to the page of the affiliate link.

Right in the middle of this sentence, is actually the submit button to a form, even though it looks exactly like a link. View the source code and see for yourself, or ...

  1. Select the above link with your mouse.
  2. Right click the selected link with your mouse.
  3. Click Inspect from the context menu.

Click the above link and you will see it redirects, via php code, to an affiliate link to a chiseled abs program on Clickbank, even though the link LOOKS as though it goes directly to their website WITHOUT an affiliate link. I guarantee you none of your websites visitors or search engine are going to know this is an affiliate link that redirects php.

Personally, this is by far our favorite way of creating affiliate redirects.

It is the smoothest and most stealth way because the website visitor will have no idea whatsoever that the link they are clicking is an affiliate link and this method also allows you to secretly and silently load a cookie dropping image in the background as the page is redirecting.

Even though Google says it has no problems, SEO-wise, with links that redirect to affiliate links, the best approach is not even have Google know you have affiliate links on your web pages and this PHP method of affiliate link redirect is a method that is least likely to be discovered by Google, any other search engines OR your website visitors.

Part One of the PHP Affiliate Link Redirect

This first part of the PHP affiliate link redirect is the form that is the affiliate link.

You can find to tool the create this completely cloaked affiliate at our Ultimate Completely Hide Affiliate Link via PHP Kit 🤿.. Just follow the simple step by step instructions there to create this completely cloaked link/form. This link opens in a new window so you don't lose your place here on this page.

Part Two of the PHP Affiliate Link Redirect

The second part of the PHP affiliate link redirect is PHP code that ...

  • Recognizes the form has been submitted.
  • Creates the cookie dropping image.
  • Redirects the page to the affiliate link.

You can also find this tool to create this second part of the php redirect affiliate link hiding code at our Ultimate Completely Hide Affiliate Link via PHP Kit 🤿.. This page opens in a new window so you don't lose your place here. Just follow the simple step by step instructions there to create the code that actually performs the redirect in a stealth manner.

How to Hide your Affiliate Links with HTACCESS Redirect

Hiding affiliate links with .htaccess is essentially the same as 301 redirection.

Htaccess is a file that a web server looks at when a web page is requested. An htaccess file can contain all types of directives and commands. A 301 redirect is considered a page moved permanently htaccess command, versus a 302 redirect which is considered a page moved temporarily redirect. For the purpose of affiliate link redirection, there does not really have to be a former page that was moved for this affiliate link redirect to work.

Here is how to edit your htaccess file to perform a 301 affiliate link redirect:

  1. Make a backup of your websites htaccess file. Since most people today mistakenly use Wordpress as a content management system, there will already be an htaccess file on your web server. You want to make a backup of your htaccess file because if you mistakenly screw it up, you are facing a virtual nightmare. If your web server does not have an htaccess file, you can create one by opening up a new, blank notepad (on Windows) or TextEdit (Mac). Save the blank file as .htaccess. That may look like a strange filename but literally you want to save the blank file as .htaccess with nothing before the period.
  2. Anywhere within this .htaccess file enter the following, on a line with nothing else on it:
  3. Redirect 301 [the PATH of url of link on your web page that will be redirected to the affiliate link] [the FULL url of the affiliate link]
    That's the word Redirect (Capital R all other letters lower case) followed by a single space followed by [the PATH of url of link on your web page that will be redirected to the affiliate link] followed by a space followed by [the FULL url of the affiliate link].

The PATH of a url is the part of the url that comes AFTER the http://www.whateverwebaddress.com. For example if the FULL url is http://www.whateverwebaddress.com/blabla/blabla.htm the PATH of that url is /blabla/blabla.htm.

Free Tool to Properly Create Htaccess Affiliate Link 301 Redirect

Use this free htaccess redirect code generator tool to create your affiliate redirect. You can specify either a 301 or 302 type redirect, but for affiliate marketing url redirection purposes a 301 htaccess redirect is usually the way to go.

How to Hide your Affiliate Links with Javascript Redirect Script - Method #1

This method of using Javascript to redirect to the affiliate url is the least preferred method because:

  • Even though it is rare for someone to NOT have Javascript enabled, this method won't work if they don't.
  • Very easily detected by Google. Not that Google hates sites with affiliate links, as many people think, but Google does not love them either.

It does not get any simpler than that. Simply replace http://www.whateverwebaddressyouwant.com with your affiliate link or whatever url you wish. Place the Javascript code anywhere withing the web page source code you wish. If you want the webpage to redirect as quickly as possible, put the Javascript code at the top of the page.

If you want there to be a delay in the redirect it simply requires a slight modification to the above Javascript code.

Again, replace http://www.whateverwebaddressyouwant.com with your affiliate link or whatever url you wish. Place the above Javascript code anyone within the web page source code you wish.

The above Javascript code employs a 3 second delay before the redirect. You can change the time of delay by changing the number of seconds you desire a delay muliplied by 1000. So for example if you want a 5 second delay, change 3000 to 5000. If you want a 1 second delay, change 3000 to 1000.

How to Hide your Affiliate Links with Javascript Redirect Script - Method #2

This method of hiding affiliate links with redirect is probably the most sneaky, in terms of the visitors experience and is a little bit better than that previous Javascript method of redirecting affiliate links. This method of redirecting your affiliate links using Javascript is a better method than Method #1 above.

The Javascript source code for this affilialte hiding redirect is below.

Here is how to use/install it:

  1. Put this code at the very bottom of the web page, either right befor the closing </body> tag or in between the closing </body> tag and closing </html> tag.
  2. Use a source code obfuscator to scamble and hide the code from Google and website visitors.
  3. Make sure to insert <script> before the start of the code and </script> after the code.

Here is the javascript code for this method of hiding affiliate links with redirect:

sel
javascript
 
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
document.onmousedown=function(mouseEvent){
var varUrlThatsClicked="https://www.google.com/";
var varAffiliateUrl="https://c3ddb752t9-0hndcd92pvg6oah.hop.clickbank.net/";
 
if(mouseEvent){
  var x=mouseEvent.clientX;y=mouseEvent.clientY;
}else{
  var x=event.clientX;y=event.clientY;
}
 
elementMouseIsOver=document.elementFromPoint(x,y);
elementMouseIsOverTagname=elementMouseIsOver.tagName.toLowerCase();
var elementMouseIsOver;var elementMouseIsOverTagname;
 
if(elementMouseIsOverTagname==="a"){
    if((elementMouseIsOver.href===varUrlThatsClicked)||(elementMouseIsOver.href===varUrlThatsClicked+"/")){
         elementMouseIsOver.href=varAffiliateUrl;
         return false;
    }
}
};

How the Advance Javascript Affiliate Hiding Redirect Code Works

  1. As soon as the web page loads there is a function which looks for and wait for the left mouse button to be pressed down on the web page.
  2. When the mouse down occurs, the code looks to make sure the left mouse button was pressed down on a link.
  3. The code then checks to see if the url in the link is the one that is suppose to be redirected. If it is, the Javascript code swaps out the url that is there with the affiliate link url.
  4. When the left mouse button is released, the url of that link has been swapped and your web browser navigates to the url of the affiliate link.

Hiding Affiliate Links with Redirect and SEO

Top executives at Google were interviewed regarding the topic of using redirection for affiliate links and their response is there is no SEO penalty regarding using redirects for affiliate links.

From an SEO standpoint there is absolutely nothing wrong with redirecting affiliate links unless something about the redirection misleads the web page visitor or something compromises the satisfaction of the visitor of your web page.

Remember, from an SEO standpoint, it is all about website visitor experience. After you finish creating a web page, including web pages where you have links that redirect to affiliate links, ask yourself "would I be 100% ok with and have no problems or complaints regarding my experience with visiting the web page?".

When it comes to anything you do with any web page, including web pages where you redirect your affiliate links, it all comes down to the satisfaction of the experience your website visitor has. A good rule of thumb is if you would feel comfortable sending your mother to the web page with your affiliate link redirects, then your web page is probably perfectly fine from an SEO standpoint.

My personal opinion is Google may not hate sites with affiliate links, but they don't love them either. If Google had to choose between favoring one of two web pages and one of them had no affiliate links and the second web page was exactly the same as the first web page, the only difference being that the second web page had an affiliate link, Google will favor the web page with no affiliate links. This is the main reason you want to hide your affiliate links using proper redirecting code.

Illustration Why Hide Affiliate Link Properly With Redirect.
Image of Illustration Why Hide Affiliate Link Properly With Redirect.
Illustration Why Hide Affiliate Link Properly With Redirect.

CONTENT RELATED TO HOW YOU CAN HIDE AFFILIATE LINK WITH REDIRECT SCRIPT ♺



What Is Spin Syntax Or Spintax

... me. In short, Spin Syntax is used to save time. In the example of POF Auto Message Sender, this program sends introductory, hello messages to singles on the Plenty Of Fish dating website. The software ...

Best Free Website Or Blog Analytics Software

... really is 100%, totally free, and they don't even use advertisements. The chat application sits out of the way as a tiny strip on your website at whatever location you prefer such as the lower left or ...

How To Completely Hide Your Affiliate Links F

... be sure it is done right, then contact us and we will set it up for you. Hide Affiliate Links From Google© works with ANY affiliate network including: It does not matter what affiliate network it is ...

COMMENTS ON HIDE YOUR AFFILIATE LINKS REDIRECT ♺

Feel free to submit your comment below. Anything that does not contribute and is just spam will automatically be deleted. Questions marked by * are required. Comments are checked by a human to make sure they are not spam/automated and are on topic and related to Hide your Affiliate Link Redirect Script ♺.

NAME:
EMAIL:
COMMENT:
HTML OK. Allowable HTML tags include: <p></p>, <i></i>, <b></b>, <em></em>, <strong></strong>, <ul><li></li></ul>, <ol><li></li></ol>
Question ❔
Back to Top