Internet Marketing Secrets
IMS #181 – March 02 2010
Affiliate Link Redirects and Link Cloaking
Link redirects are the most powerful tool a marketer can have. They save a mountain of time and energy. They make it easy for you to change all your affiliate links at once. Even if you’ve been publishing online for 15 years.
So instead of changing hundreds of links, in web pages, posts and PDFs, you can replace all the link rot, and dead links, in less than a minute. It’s the super powerful server side htaccess redirect.
In addition to redirects, the htaccess file can be used to add a custom 404 page, fix a link in a printed publication, fix links from other sites and affiliate link cloaking. It also creates more memorable links, replaces url shorteners and it’s more search engine friendly than other styles of redirects.
Here’s the full inside scoop on how you can put htaccess to work for you…
- – - Sponsor – - -
SEO Makes Rankings Grow
If you do SEO, you must read this report by Dr. Andy Williams. He provides new evidence that themes work. He confirms my findings, that if you don’t nail your on-page factors, links won’t help you get top rankings.
Themes are important to Google, because their real goal is to mimic human language understanding. Links build a reputation for your sites and pages, but ultimately, the understanding of what the page is about, comes down to the semantics.
Dr. Williams shares little known secrets, on how you can leverage the concept of theming, to boost your search engine rankings. Right click to download the PDF. Do what it says. And watch your rankings grow.
- – - /Sponsor – - -
How to Use htaccess for Affiliate Link Redirects
If you’ve been reading my newsletter, blog or ebooks, you’ve probably noticed links like this:
http://www.cdzn.com/isp
http://www.cdzn.com/lfg
http://www.cdzn.com/vlt
When these links get clicked on, they do not lead to pages on cdzn.com. They are redirects. The browser is immediately redirected to the target page. Usually, but not always, they are affiliate links.
The letters after the slash / in the urls were put there by me. It’s just a little two or three letter code to remind me which affiliate program the link belongs to.
In the case of /isp it’s my affiliate link for iStock Photo. I use the first letter of each word in the product name, to make it easier to remember what the link stands for. For example, the /lfg redirect leads to the Legal Forms Generator affiliate program.
Now here’s what makes it work. The part behind the scenes. Something called the .htaccess file. Pronounced dot h t access. The dot, or period, is a mandatory part of the file name.
(This works on almost all Unix servers. If you use a Windblows server it won’t work. If you’re stuck using a Windows server, grab a second hosting account over at hostica.com. Unix accounts start at a dollar a month. You can host all your redirects there.)
The htaccess file is something that you create. It’s a simple text file. You can create it using any text editor.
Word processors like MS Word will not work. Use a text editor like BBEdit or the freely available Text Wrangler on the Mac. Choose Notepad or UltraEdit on the PC.
The text editor must be able to save the file as plain old text. ASCII format to be technically correct. No proprietary control codes or formatting junk is allowed.
So here again are the links we want to redirect:
http://www.cdzn.com/isp
http://www.cdzn.com/lfg
http://www.cdzn.com/vlt
The redirects in the htaccess file look like this:
Redirect /isp http://istockphoto.com/index.php?refnum=dmcorp
Redirect /lfg http://www.NitroShoppingCart.com/app/?af=1050998
Redirect /vlt http://www.dynamicmedia.com
You can copy and paste the example above if you like. Just be sure to replace my affiliate links with your own.
Note: The syntax is very important. Make one mistake like missing a space, or a slash, and it won’t work. The word Redirect must be capitalized. Followed by a space. Followed by a slash. Followed by whatever you want to call the redirect. Followed by a space. Followed by your affiliate url.
Each redirect must be on its own line, with a carriage return after each one. The text file must be saved as a Unix or DOS text file.
A Mac text file will not work properly, as they do not contain carriage returns. Open the file in TextWrangler and save it as a Unix text file.
Also, if you’re working on a Unix operating system like Mac OS X, periods in file names are reserved for the operating system. Any file name preceded by a . will be invisible on your computer.
In other words, if you save the file as .htaccess on your hard drive it will disappear… and I do mean vanish. The solution is to save your text file as htaccess, /htaccess, or some name without the period on your hard drive.
Upload the htaccess file – via FTP – to the root directory on your server. Then once it’s on your server, add the period by renaming it to .htaccess.
Once you rename the file, it may seem to disappear on the server as well. It’s probably there, you just can’t see it. All you need to do, is test one of your redirects. If it works, your htaccess file is alive and well.
Note: You must upload the htaccess file to the root directory. That’s the same place as your home page or index.html page. It cannot be inside any folder on your server.
Note: Do not over write your existing .htaccess if you already have one. If you installed WordPress into your root directory, you don’t want to destroy, or replace the file that’s already there. You can add to it, but only if you know exactly what you’re doing.
(That’s why I use a separate domain for my htaccess redirects at cdzn.com. It’s the web site’s real purpose. You don’t need to build a site on the redirect domain, it can be used for redirects only, or you can put up a single page like sellwhatyouknow.com if you really want to.)
- – - Adv – - -
Ken McCarthy’s System Seminar
It’s the no hype, no pitches, no fad, no BS internet marketing SYSTEM, that has trained more successful marketers than all other seminars combined.
Since 1994 Ken McCarthy has presented the brightest minds. This year features copywriting legends Drayton Bird and Bob Bly. Mobile marketing wizard Kim Dushinski. Plus virtuosos, mavins and crackerjacks like Glenn Livingston, Timothy Seward, Greg Davis and Ben Moskel.
If marketing was an Olympic event, the 2010 System Seminar would walk away with the Gold. Want to be a part of the winning team? Come join us.
- – - /Adv – - -
Now it’s time for you to try it. Open your text editor. Copy and paste this one redirect.
Redirect /vlt http://www.dynamicmedia.com
Yes, it’s just one line of text with a carriage return. Save it as a DOS or UNIX text file. FTP it to the root directory on your server. Rename the file while it’s on the server to .htaccess.
Now try it. For example, type in http://www.yourdomain.com/vlt and you’ll be redirected to the Dynamic Media site. (Replace yourdomain.com in the example with your real domain name.)
That’s all there is to it. You can now repeat the process with your affiliate links.
In the future, if an affiliate link stops working, or you no longer support the program, you can change this one redirect. Just like magic, every link you’ve ever created in your legacy of blog posts, articles, web pages and PDFs will have a new destination.
Other purposes of the redirects include:
Adding a custom 404 file.
Fixing a link in a publication.
Fixing links from other sites.
Private affiliate link cloaking.
Creating more memorable links.
Making all links smell similar.
Replacing nasty url shorteners.
Being search engine friendly.
Wishing you all the best for online success,
Michael
P.S.
The rest of this strategy is inside Michael Campbell’s Private Site, the Dynamic Media Vault. Find out how you can trick out server side redirects, make custom 404 pages and PHP redirects to solve all sorts of linking and marketing problems. Want to become part of the club? Come on over:

