wp link cloaking

Status
Not open for further replies.


Well, from reading the threads here on wp, I was under the assumption that you should cloak affiliate links? Was I wrong to assume there was a good reason for this?
I thought hiding the affiliate code helped when getting listed in the serps and not making it seem like I was just blogging for the money?
 
I cloak affiliate links on some of my blogs...helps with SEO (less outbound links)...i use a php script tho not a pluggin
 
You can use a simple PHP script to redirect.

Users are redirected quickly and seamlessly.

When using the 'Back' button, the user is taken to the last viewed page, not the redirect page.

Works on all browsers.

Difficulty: Easy

Time Required: 1 Minute

Here's How:
<?php
header( 'Location: http://www.yoursite.com/new_page.html' ) ;
?>

You need to replace the URL above with the URL you wish to direct to.

Be sure that you do not have any text sent to the browser before this, or it will not work. Your safest bet is to simply remove all content from the page except the redirect code. Just a plain .php page with noting else on it. Name it whatever you want with the .php extension and link to it. Make one page for each link you want to cloak.

Example of bad code...
<html>
<?php
//this will NOT work, the browser received the HTML tag before the script
header( 'Location: http://www.yoursite.com/new_page.html' ) ;
?>
 
Status
Not open for further replies.