<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>msafi.com &#187; Robots.txt</title>
	<atom:link href="http://msafi.com/tag/robots-txt/feed/" rel="self" type="application/rss+xml" />
	<link>http://msafi.com</link>
	<description>The friendly blog of MK Safi</description>
	<lastBuildDate>Thu, 26 Aug 2010 12:50:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Best Way to Organize and Cloak Affiliate Links in WordPress</title>
		<link>http://msafi.com/create-and-cloak-affiliate-links-in-wordpress/</link>
		<comments>http://msafi.com/create-and-cloak-affiliate-links-in-wordpress/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 00:09:17 +0000</pubDate>
		<dc:creator>MK</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Affiliate Links]]></category>
		<category><![CDATA[ClickBank]]></category>
		<category><![CDATA[Geeky Tips]]></category>
		<category><![CDATA[Internet Marketing]]></category>
		<category><![CDATA[Link Cloaking]]></category>
		<category><![CDATA[Redirection]]></category>
		<category><![CDATA[Robots.txt]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://msafi.com/?p=205</guid>
		<description><![CDATA[If you currently have or plan to have plenty of affiliate links on your WordPress based website, you should have a way to easily track and manage these affiliate links. You want to know how many clicks each link received and you want to be able to edit and change the affiliate link without having [...]


Related posts:<ol><li><a href='http://msafi.com/automatically-create-and-cloak-amazon-affiliate-links-in-wordpress/' rel='bookmark' title='Permanent Link: Automatically Create and Cloak Amazon Affiliate Links in WordPress'>Automatically Create and Cloak Amazon Affiliate Links in WordPress</a></li>
<li><a href='http://msafi.com/squeezing-the-seo-juice-out-of-your-affiliates/' rel='bookmark' title='Permanent Link: Squeezing the SEO Juice Out of Your Affiliates'>Squeezing the SEO Juice Out of Your Affiliates</a></li>
<li><a href='http://msafi.com/great-networks-for-software-affiliates-and-vendors/' rel='bookmark' title='Permanent Link: Great Networks for Software Affiliates and Vendors'>Great Networks for Software Affiliates and Vendors</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-363 noborder" title="organizelinks" src="http://msafi.com/home5/mohamme3/public_html/msaficom/wp-content/uploads/2009/10/organizelinks.gif" alt="organizelinks" width="200" height="146" /></p>
<p>If you currently have or plan to have plenty of affiliate links on your WordPress based website, you should have a way to easily track and manage these affiliate links. You want to know how many clicks each link received and you want to be able to edit and change the affiliate link without having to revisit and change old content.</p>
<p>And to keep your website clean and organized in the eyes of search engines, there are a few things that will need tweaking.</p>
<p>Here&#8217;s how I create, manage and cloak my affiliate links.<span id="more-205"></span></p>
<h2 style="text-align: left;">Using Redirection</h2>
<p><a href="http://wordpress.org/extend/plugins/redirection/">Redirection</a> is a WordPress plugin that is made by <a href="http://urbangiraffe.com/">John Godley</a>, who works for <a href="http://www.automattic.com">Automattic</a>, the company behind WordPress. Redirection helps you manage your blog URLs. Using Redirection, you could create a link like <span style="background-color: #fff9dc;">http://msafi.com/gotogoogle/</span> and set that link to forward to <span style="background-color: #fff9dc;">http://google.com</span>. Similarly, you could put all your affiliate forwarders in a virtual directory like:</p>
<ul>
<li>http://msafi.com/affiliate/product1/</li>
<li>http://msafi.com/affiliate/product2/</li>
<li>http://msafi.com/affiliate/product3/</li>
<li>and so on&#8230;</li>
</ul>
<p>Most people don&#8217;t use <span style="background-color: #fff9dc;"><em>affiliate</em></span> for the directory name, though. They use <em><span style="background-color: #fff9dc;">goto</span> </em>or <span style="background-color: #fff9dc;"><em>visit</em></span>. Or like on this website, I simply use <em><span style="background-color: #fff9dc;">a</span>.</em></p>
<p>Redirection also allows you to group related URL redirections together. So, you could create a group, name it Affiliate Links and put all your affiliate links there.</p>
<h2>Create an affiliate link in Redirection</h2>
<p>Once you have Redirection installed</p>
<ol>
<li>Click on <span style="background-color: #fff9dc;">Groups</span> in the top left corner</li>
<li>At the bottom of the page, you&#8217;ll see <span style="background-color: #fff9dc;">Add Group</span>. Enter <span style="background-color: #fff9dc;">Affiliate Links</span> in the textbox, and click <span style="background-color: #fff9dc;">Add</span>.</li>
<li>Click on your newly added group, <span style="background-color: #fff9dc;">Affiliate Links</span></li>
<li>In the source URL, put something like <span style="background-color: #fff9dc;"> </span><span style="background-color: #fff9dc;"> </span><span style="background-color: #fff9dc;">/visit/product-xyz/</span> (don&#8217;t include your domain name, <em>http://ursite.com</em>)</li>
<li>For <span style="background-color: #fff9dc;">Match</span>, select <span style="background-color: #fff9dc;">URL only</span></li>
<li>For <span style="background-color: #fff9dc;">Action</span>, select <span style="background-color: #fff9dc;">Redirect to URL</span></li>
<li>Leave <span style="background-color: #fff9dc;">Regular expression</span> unchecked</li>
<li>In <span style="background-color: #fff9dc;">Target URL</span>, put your affiliate link</li>
</ol>
<p>That&#8217;s it. You&#8217;ve added your first affiliate link to Redirection.</p>
<p>Now whenever you want to link to Product XYZ, use http://ursite.com/visit/product-xyz/. It&#8217;s even easier to remember.</p>
<p>Redirection also gives you the number of hits each link received. So, if you&#8217;re putting your links in relevant places and getting huge volumes of clicks but maybe no sales, you&#8217;ll know something is going on&#8230;</p>
<h2>Cool tip: get Redirection to automatically create ClickBank affiliate links for you!</h2>
<p>If you promote products for ClickBank, here&#8217;s a cool tip that you&#8217;ll find very useful.</p>
<p>All of ClickBank&#8217;s links have the following structure</p>
<p><code>http://<span style="color: #ff0000;"><strong>YourClickBankID</strong></span>.<span style="color: #0000ff;"><strong>VendorClickBankID</strong></span>.hop.clickbank.net</code></p>
<p>You can tell Redirection to automatically fill in the VendorClickBankID field for you based on a value that you provide in your URL. Like:</p>
<p><span style="background-color: #fff9dc;">http://ursite.com/cb/<strong>vendorx311</strong>/ </span></p>
<p>automatically redirects to</p>
<p><span style="background-color: #fff9dc;">http://yourClickBankID.<strong>vendorx311</strong>.hop.clickbank.net</span></p>
<p>and</p>
<p><span style="background-color: #fff9dc;">http://ursite.com/cb/<strong>sumvendor2</strong>/</span></p>
<p>automatically redirects to</p>
<p><span style="background-color: #fff9dc;">http://yourClickBankID.<strong>sumvendor2</strong>.hop.clickbank.net</span></p>
<p>&#8230;and so on&#8230;</p>
<p>Here&#8217;s how you do this in Redirection:</p>
<ol>
<li>In the Source URL, enter <span style="background-color: #fff9dc;">/cb/([^/]*)</span></li>
<li>In Target URL, enter <span style="background-color: #fff9dc;">http://yourClickBankID.$1.hop.clickbank.net</span></li>
<li>Make sure <span style="background-color: #fff9dc;">Regular expression</span> is checked</li>
<li>Match should be set to <span style="background-color: #fff9dc;">URL only</span></li>
<li>Action should be set to <span style="background-color: #fff9dc;">Redirect URL</span></li>
</ol>
<p>I have done this on my website here at <a href="http://msafi.com">msafi.com</a>. So, now I can simply give out a link like <a rel="nofollow" href="http://msafi.com/cb/4idiots/">http://msafi.com/cb/4idiots/</a>. This will redirect to <a rel="nofollow" href="http://mksafi.4idiots.clickbank.net">http://mksafi.4idiots.clickbank.net</a>, which is the landing sales page for the product sold by <em>4idiots </em>ClickBank vendor. You can replace <em>4idiots</em> with any ClickBank vendor ID and it will still work.</p>
<p>Pretty cool isn&#8217;t it?</p>
<p>Perhaps a similar trick can be done to automate link cloaking and management for Amazon and Commission Junction, but I&#8217;ll have to look into that.</p>
<p>For now, let&#8217;s look into optimizing your affiliate links so that Google will not have trouble with them&#8230;</p>
<h2>Helping Google not trip over your affiliate links</h2>
<p>Now that you have a convenient and easy way to create and organize affiliate links, I&#8217;m gonna show you how to make sure that Google will not discriminate against your blog as a result of affiliate links.</p>
<p>First, whenever you add an affiliate link as anchor text make sure that you include a rel=&#8221;nofollow&#8221; attribute in the anchor tag. That is</p>
<p>Bad: <span style="background-color: #fff9dc;">&lt;a href=&#8221;http://ursite.com/visit/product-xyz/&#8221;&gt;Product XYZ&lt;/a&gt;</span></p>
<p>Good: <span style="background-color: #fff9dc;">&lt;a href=&#8221;http://ursite.com/visit/product-xyz/&#8221; rel=&#8221;nofollow&#8221;&gt;Product XYZ&lt;/a&gt;</span></p>
<p>If you want to automate the creation of anchor text links in WordPress, check out the plugin I created: <a href="http://msafi.com/wordpress-plugins/turn-keywords-into-links-with-word-2-cash/">Word 2 Cash</a>.</p>
<p>Second, use <a href="http://www.robotstxt.org">robots.txt</a> to disallow Google (and other search engines) from accessing your virtual affiliate links URL directories. Your affiliate link directories are /visit/, /cb/ and whatever else you may have created.</p>
<p>In your robots.txt file add lines like:</p>
<p><code>Disallow: /visit/*<br />
Disallow: /cb/*</code></p>
<p>Do the same for any other affiliate link directory you have.</p>
<p>This will help Google index your website in a clean way and hopefully minimize discrimination against your outbound links.</p>
<p style="text-align: left;">That&#8217;s all there is to it. You now have a great way to create and manage your affiliate links. Just one last thing before you go.</p>
<h3>Reducing Redirection database size</h3>
<p>Redirection keeps a record of every redirect it makes. It stores these records in your database. If you&#8217;re gonna be using the plugin the way I described in this post, your records can build up and take a lot of space pretty quickly. What you want to do is set the records to expire after some time, say 30 days. To do that:</p>
<ol>
<li>go to Redirection&#8217;s admin page</li>
<li>Click on <span style="background-color: #fff9dc;">Options</span></li>
<li>In the <span style="background-color: #fff9dc;">Expire Logs</span> field, enter 30 and click Save.</li>
</ol>
<p>Aaaaaaand you&#8217;re done!</p>


<p>Related posts:<ol><li><a href='http://msafi.com/automatically-create-and-cloak-amazon-affiliate-links-in-wordpress/' rel='bookmark' title='Permanent Link: Automatically Create and Cloak Amazon Affiliate Links in WordPress'>Automatically Create and Cloak Amazon Affiliate Links in WordPress</a></li>
<li><a href='http://msafi.com/squeezing-the-seo-juice-out-of-your-affiliates/' rel='bookmark' title='Permanent Link: Squeezing the SEO Juice Out of Your Affiliates'>Squeezing the SEO Juice Out of Your Affiliates</a></li>
<li><a href='http://msafi.com/great-networks-for-software-affiliates-and-vendors/' rel='bookmark' title='Permanent Link: Great Networks for Software Affiliates and Vendors'>Great Networks for Software Affiliates and Vendors</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://msafi.com/create-and-cloak-affiliate-links-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
