{"id":2899,"date":"2010-05-17T10:51:23","date_gmt":"2010-05-17T19:51:23","guid":{"rendered":"http:\/\/www.rosalindgardner.com\/blog\/?p=2899"},"modified":"2019-02-13T11:25:35","modified_gmt":"2019-02-13T19:25:35","slug":"how-to-cloak-your-affiliate-links-the-easy-way","status":"publish","type":"post","link":"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/","title":{"rendered":"How to Cloak Your Affiliate Links the Easy Way"},"content":{"rendered":"<p><strong><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/rosalindgardner.com\/blog\/wp-content\/uploads\/cloak-mask.jpg\" alt=\"\" title=\"cloak-mask\" width=\"300\" height=\"400\" style=\"float: right; padding: 0px 0px 10px 10px;\" border=\"0\">I used to cloak my links the old-fashioned way, using simple HTML redirects. <\/strong><\/p>\n<p>The html page would be coded as follows:<\/p>\n<blockquote><p>&lt;html&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;title&gt;YOUR PAGE TITLE&lt;\/title&gt;<\/p>\n<p>&lt;meta http-equiv=&#8221;refresh&#8221; content=&#8221;0;url=http:\/\/YOUR AFFILIATE  URL&#8221;&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n&lt;p&gt;Redirecting, please wait. If you're not redirected within a couple of  seconds, click here:&lt;br \/&gt;<br \/>\n&lt;a href=&#8221;http:\/\/YOUR AFFILIATE URL&#8221;&gt;PRODUCT NAME&lt;\/a&gt;<\/p>\n<p>&lt;\/p&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<\/p><\/blockquote>\n<p>The contents of the page would appear like this:<\/p>\n<blockquote><p>If you are not redirected within a couple of seconds, click here:<\/p>\n<p>PRODUCT NAME\n<\/p><\/blockquote>\n<p>Then I moved to using PHP redirects, one page for each affiliate link, such as the following which would have been linked from <em>http:\/\/yourdomain.com\/go\/affiliatelink1<\/em><\/p>\n<p>Here is the code used for that page:<\/p>\n<blockquote><p>&lt;?php<br \/>\nheader( &#8216;Location: http:\/\/affiliatelink1.com' ) ;<br \/>\n?&gt;<\/p><\/blockquote>\n<p><strong>Nowadays, I use a much simpler technique that puts all my affiliate links on one php page, i.e. link.php, which resides in the root directory.<\/strong><\/p>\n<blockquote><p>&lt;?php<\/p>\n<p>$path = array(<br \/>\n&#8216;affiliatelink1' =&gt;\u00c2\u00a0 &#8216;http:\/\/affiliatelink1.com',<br \/>\n&#8216;affiliatelink2' =&gt;\u00c2\u00a0 &#8216;http:\/\/affiliatelink1.com',<br \/>\n&#8216;affiliatelink3' =&gt;\u00c2\u00a0 &#8216;http:\/\/affiliatelink1.com',<\/p>\n<p>);<\/p>\n<p>if (array_key_exists($_GET[&#8216;id'], $path))<br \/>\nheader(&#8216;Location: &#8216; .$path[$_GET[&#8216;id']]);<br \/>\n?&gt;<\/p><\/blockquote>\n<p>To make the links work, you must add the following to your .htaccess file:<\/p>\n<blockquote><p>RewriteEngine On<br \/>\nRewriteRule ^go\/([\/_0-9a-zA-Z-]+)$ link.php?id=$1<\/p><\/blockquote>\n<p>The links are then called using the following linking format:<\/p>\n<blockquote><p>http:\/\/yourdomain.com\/go\/affiliatelink1<\/p><\/blockquote>\n<p>Note, you don't have to create a &#8216;go' folder and you may call it anything you like, i.e. recommends, go, links&#8230; whatever. <\/p>\n<p>For example, if  youed want to use &#8216;links' rather than &#8216;go', then change <em>^go\/<\/em> to <em>^links\/<\/em><\/p>\n<p>And that's how to cloak your affiliate links the easy way!<\/p>\n<p>Comments, questions or suggestions? Please leave a comment below!<\/p>\n<p>Cheers,<br \/>\nRos<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I used to cloak my links the old-fashioned way, using simple HTML redirects. The html page would be coded as follows: &lt;html&gt; &lt;head&gt; &lt;title&gt;YOUR PAGE TITLE&lt;\/title&gt; &lt;meta http-equiv=&#8221;refresh&#8221; content=&#8221;0;url=http:\/\/YOUR AFFILIATE URL&#8221;&gt; &lt;\/head&gt; &lt;body&gt; &lt;p&gt;Redirecting, please wait. If you&#8217;re not redirected within a couple of seconds, click here:&lt;br \/&gt; &lt;a href=&#8221;http:\/\/YOUR AFFILIATE URL&#8221;&gt;PRODUCT NAME&lt;\/a&gt; &lt;\/p&gt; &lt;\/body&gt; [&hellip;]<\/p>\n","protected":false},"author":577,"featured_media":11052,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[937,1222],"tags":[1230,1231,883],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Cloak Your Affiliate Links the Easy Way - RosalindGardner.com<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Cloak Your Affiliate Links the Easy Way - RosalindGardner.com\" \/>\n<meta property=\"og:description\" content=\"I used to cloak my links the old-fashioned way, using simple HTML redirects. The html page would be coded as follows: &lt;html&gt; &lt;head&gt; &lt;title&gt;YOUR PAGE TITLE&lt;\/title&gt; &lt;meta http-equiv=&#8221;refresh&#8221; content=&#8221;0;url=http:\/\/YOUR AFFILIATE URL&#8221;&gt; &lt;\/head&gt; &lt;body&gt; &lt;p&gt;Redirecting, please wait. If you&#039;re not redirected within a couple of seconds, click here:&lt;br \/&gt; &lt;a href=&#8221;http:\/\/YOUR AFFILIATE URL&#8221;&gt;PRODUCT NAME&lt;\/a&gt; &lt;\/p&gt; &lt;\/body&gt; [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/\" \/>\n<meta property=\"og:site_name\" content=\"RosalindGardner.com\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RosalindGardnerOnline?ref=hl\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/RosalindGardnerOnline\" \/>\n<meta property=\"article:published_time\" content=\"2010-05-17T19:51:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-02-13T19:25:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/rosalindgardner.com\/blog\/wp-content\/uploads\/cloak-mask.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"300\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Rosalind Gardner\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosalindgardner\" \/>\n<meta name=\"twitter:site\" content=\"@rosalindgardner\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rosalind Gardner\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/\",\"url\":\"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/\",\"name\":\"How to Cloak Your Affiliate Links the Easy Way - RosalindGardner.com\",\"isPartOf\":{\"@id\":\"https:\/\/rosalindgardner.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/rosalindgardner.com\/blog\/wp-content\/uploads\/cloak-mask.jpg\",\"datePublished\":\"2010-05-17T19:51:23+00:00\",\"dateModified\":\"2019-02-13T19:25:35+00:00\",\"author\":{\"@id\":\"https:\/\/rosalindgardner.com\/blog\/#\/schema\/person\/e1a2787f4571b58c05f7c8cd6a98fa9f\"},\"breadcrumb\":{\"@id\":\"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/#primaryimage\",\"url\":\"https:\/\/rosalindgardner.com\/blog\/wp-content\/uploads\/cloak-mask.jpg\",\"contentUrl\":\"https:\/\/rosalindgardner.com\/blog\/wp-content\/uploads\/cloak-mask.jpg\",\"width\":\"300\",\"height\":\"400\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/rosalindgardner.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Cloak Your Affiliate Links the Easy Way\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/rosalindgardner.com\/blog\/#website\",\"url\":\"https:\/\/rosalindgardner.com\/blog\/\",\"name\":\"RosalindGardner.com\",\"description\":\"Learn Blogging &amp; Affiliate Marketing with Rosalind Gardner\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/rosalindgardner.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/rosalindgardner.com\/blog\/#\/schema\/person\/e1a2787f4571b58c05f7c8cd6a98fa9f\",\"name\":\"Rosalind Gardner\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rosalindgardner.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/76d7f9fe48227e9a6f4b6c1d3f786941?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/76d7f9fe48227e9a6f4b6c1d3f786941?s=96&d=mm&r=g\",\"caption\":\"Rosalind Gardner\"},\"description\":\"Super affiliate, blogger, and speaker, Rosalind is best known for her affiliate marketing training in the Super Affiliate Handbook: How I made $436,797 in One Year Selling Other Peoples' Stuff Online. You can connect with her on Facebook.\",\"sameAs\":[\"https:\/\/rosalindgardner.com\/blog\/sah\",\"https:\/\/www.facebook.com\/RosalindGardnerOnline\",\"https:\/\/www.pinterest.ca\/rosalindgardner\/\",\"https:\/\/x.com\/rosalindgardner\",\"https:\/\/www.youtube.com\/user\/rosalindgardner\"],\"url\":\"https:\/\/rosalindgardner.com\/blog\/author\/rosalindgardner\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Cloak Your Affiliate Links the Easy Way - RosalindGardner.com","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/","og_locale":"en_US","og_type":"article","og_title":"How to Cloak Your Affiliate Links the Easy Way - RosalindGardner.com","og_description":"I used to cloak my links the old-fashioned way, using simple HTML redirects. The html page would be coded as follows: &lt;html&gt; &lt;head&gt; &lt;title&gt;YOUR PAGE TITLE&lt;\/title&gt; &lt;meta http-equiv=&#8221;refresh&#8221; content=&#8221;0;url=http:\/\/YOUR AFFILIATE URL&#8221;&gt; &lt;\/head&gt; &lt;body&gt; &lt;p&gt;Redirecting, please wait. If you're not redirected within a couple of seconds, click here:&lt;br \/&gt; &lt;a href=&#8221;http:\/\/YOUR AFFILIATE URL&#8221;&gt;PRODUCT NAME&lt;\/a&gt; &lt;\/p&gt; &lt;\/body&gt; [&hellip;]","og_url":"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/","og_site_name":"RosalindGardner.com","article_publisher":"https:\/\/www.facebook.com\/RosalindGardnerOnline?ref=hl","article_author":"https:\/\/www.facebook.com\/RosalindGardnerOnline","article_published_time":"2010-05-17T19:51:23+00:00","article_modified_time":"2019-02-13T19:25:35+00:00","og_image":[{"width":300,"height":400,"url":"https:\/\/rosalindgardner.com\/blog\/wp-content\/uploads\/cloak-mask.jpg","type":"image\/jpeg"}],"author":"Rosalind Gardner","twitter_card":"summary_large_image","twitter_creator":"@rosalindgardner","twitter_site":"@rosalindgardner","twitter_misc":{"Written by":"Rosalind Gardner","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/","url":"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/","name":"How to Cloak Your Affiliate Links the Easy Way - RosalindGardner.com","isPartOf":{"@id":"https:\/\/rosalindgardner.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/#primaryimage"},"image":{"@id":"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/#primaryimage"},"thumbnailUrl":"https:\/\/rosalindgardner.com\/blog\/wp-content\/uploads\/cloak-mask.jpg","datePublished":"2010-05-17T19:51:23+00:00","dateModified":"2019-02-13T19:25:35+00:00","author":{"@id":"https:\/\/rosalindgardner.com\/blog\/#\/schema\/person\/e1a2787f4571b58c05f7c8cd6a98fa9f"},"breadcrumb":{"@id":"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/#primaryimage","url":"https:\/\/rosalindgardner.com\/blog\/wp-content\/uploads\/cloak-mask.jpg","contentUrl":"https:\/\/rosalindgardner.com\/blog\/wp-content\/uploads\/cloak-mask.jpg","width":"300","height":"400"},{"@type":"BreadcrumbList","@id":"https:\/\/rosalindgardner.com\/blog\/how-to-cloak-your-affiliate-links-the-easy-way\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rosalindgardner.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Cloak Your Affiliate Links the Easy Way"}]},{"@type":"WebSite","@id":"https:\/\/rosalindgardner.com\/blog\/#website","url":"https:\/\/rosalindgardner.com\/blog\/","name":"RosalindGardner.com","description":"Learn Blogging &amp; Affiliate Marketing with Rosalind Gardner","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rosalindgardner.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/rosalindgardner.com\/blog\/#\/schema\/person\/e1a2787f4571b58c05f7c8cd6a98fa9f","name":"Rosalind Gardner","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rosalindgardner.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/76d7f9fe48227e9a6f4b6c1d3f786941?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/76d7f9fe48227e9a6f4b6c1d3f786941?s=96&d=mm&r=g","caption":"Rosalind Gardner"},"description":"Super affiliate, blogger, and speaker, Rosalind is best known for her affiliate marketing training in the Super Affiliate Handbook: How I made $436,797 in One Year Selling Other Peoples' Stuff Online. You can connect with her on Facebook.","sameAs":["https:\/\/rosalindgardner.com\/blog\/sah","https:\/\/www.facebook.com\/RosalindGardnerOnline","https:\/\/www.pinterest.ca\/rosalindgardner\/","https:\/\/x.com\/rosalindgardner","https:\/\/www.youtube.com\/user\/rosalindgardner"],"url":"https:\/\/rosalindgardner.com\/blog\/author\/rosalindgardner\/"}]}},"_links":{"self":[{"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/posts\/2899"}],"collection":[{"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/users\/577"}],"replies":[{"embeddable":true,"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/comments?post=2899"}],"version-history":[{"count":0,"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/posts\/2899\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/media\/11052"}],"wp:attachment":[{"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/media?parent=2899"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/categories?post=2899"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rosalindgardner.com\/blog\/wp-json\/wp\/v2\/tags?post=2899"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}