This is an easy guide to create your own “pretty affiliate URLs” using a simple affiliate redirect script in PHP.
First of all, let’s take a look at the desired effect. For this example, I’m going to use a nice Legal Form Generator affiliate URL I often share:
Notice the URL is complex. It’s hard to say it in an audio recording, or even for a prospect to remember it.
Rather than give out this complicated URL, I simply share a “pretty affiliate URL” that looks like this:
Tidy, isn’t it? You can create your own on your domain using the following recipe.
Requirements:
- A domain name (your current website domain will do)
- A hosting account (your website is fine for this too)
- FTP access to your server so you can transfer files
- A text editor like Microsoft Notepad or Mac TextEdit
- At least ONE Affiliate URL
Directions:
1. Open your text editor and copy the following PHP script exactly to a new file:
<?php header('Location: http://www.nitroshoppingcart.com/app/?af=1268050'); ?>
2. Replace the demo URL with your own affiliate URL, making sure not to remove the single quote in the code.
3. Save the file to your Desktop with the name ‘index.php’ (without quotes).
4. Open your FTP client (BestFtp 2000 or WinSCP is good)
5. Connect to your server’s home directory. Usually /public_html or just /html.
6. Create a new directory called ‘recommends’ (without quotes).
7. Browse to the ‘recommends’ directory
8. Create a new directory called ‘legal’ or whatever you want to refer to your affiliate program as. It doesn’t matter what you put here, as long as it’s a unique name.
9. Browse to the ‘legal’ directory.
10. Once inside, upload the index.php file on your desktop to the open directory. This copies the file index.php to http://yourdomain.com/recommends/legal/
You’re done!
Now you can test this by browsing to http://yourdomain.com/recommends/legal
Of course, if you used different directories, you would need to replace my demo URL with the path you used.
You can add as many affiliate products as you want in the same way. Just create new directories inside the ‘recommends’ directory and upload index.php files to them.
The file “index.php” is the default file accessed when someone browses to the directory you specify. Share your pretty affiliate URL with your prospects and all sales that access your pretty link from now on will be tracked to you.
Please Note: if you don’t have PHP installed on your server, you may need to use the Affiliate Link Javascript Redirect or Affiliate Link HTML redirect with Time Delay versions instead.
~jim
P.S. for more tricks like this, check out the YaghiLabs Internet Business Academy at…