How to make a no-follow link?

Discussion in 'HTML & Website Design' started by glitto, Jan 18, 2008.

  1. #1
    I have heard that no-follow links does not transfer the PR juice to the sites so I want to make a no-follow link but don't know how to make it.

    for example I have this code
    <a href="http://www.smartpixels.net" target="_blank">Smart Pixels</a>

    How can I make this link a no-follow link, Please guide me.

    Thank you
     
    glitto, Jan 18, 2008 IP
  2. WebGeek182

    WebGeek182 Active Member

    Messages:
    510
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    95
    #2
    Add rel="nofollow", for example:
    <a href="http://www.smartpixels.net" target="_blank" rel="nofollow">Smart Pixels</a>
     
    WebGeek182, Jan 18, 2008 IP
    glitto likes this.
  3. glitto

    glitto Notable Member

    Messages:
    2,839
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    205
    #3
    Really... its that simple?

    wow, I thought there must be few lines of code to make it so.

    Thanks for your help.
     
    glitto, Jan 18, 2008 IP
  4. LawnchairLarry

    LawnchairLarry Well-Known Member

    Messages:
    318
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    118
    #4
    As mentioned previously, you only need to add the attribute rel="nofollow" to a hyperlink. Note that the target attribute is not allowed in XHTML 1.0 Strict and newer versions. In that case, you may want to replace the target attribute by rel="external".
     
    LawnchairLarry, Jan 18, 2008 IP
  5. WebGeek182

    WebGeek182 Active Member

    Messages:
    510
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    95
    #5
    Yes, super simple. :) You're welcome!
     
    WebGeek182, Jan 18, 2008 IP
  6. Dr_Web

    Dr_Web Well-Known Member

    Messages:
    453
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #6
    This is not my thread but I have interest in this and more, how can I also make an affiliate link like this one: <a href="http://xxxxx.xxxxxxx.hop.clickbank.net"> nofollow and noindex.

    Can you help me please?

    Sorry glitto for "hijack" your thread :).

    Regards
    Dr Web
     
    Dr_Web, Jan 18, 2008 IP
  7. LawnchairLarry

    LawnchairLarry Well-Known Member

    Messages:
    318
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    118
    #7
    Dr Web, just add rel="noindex,nofollow" to the hyperlink:

    <a href="http://xxxxx.xxxxxxx.hop.clickbank.net" rel="noindex,nofollow">

    And if you want to replace the target attribute, that would be:

    <a href="http://xxxxx.xxxxxxx.hop.clickbank.net" rel="noindex,nofollow,external">

    You may want to apply link cloaking too.
     
    LawnchairLarry, Jan 18, 2008 IP
  8. glitto

    glitto Notable Member

    Messages:
    2,839
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    205
    #8
    I will NEVER mind if you pay me the royalty :D

    just kidding
     
    glitto, Jan 18, 2008 IP
  9. Dr_Web

    Dr_Web Well-Known Member

    Messages:
    453
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #9
    Cloaking, that sounds very good :D, can I cloak a clickbank link without affect the track of that link? How can I cloak the link? Is that possible cloak the link to the link appears as a direct link to the page of the product or service that I want to promote, like http://www.seoelite.com and the reader will not able to see http://www.myclickbankid.clickbankidoftheproductowner.hop.clickbank.net, if you tell me that I will rep you all green :D:D.

    By the way, is better an affiliate link open in a new window or not, target blank or external, vantages versus disadvantages.

    Thanks very, very much for any help.

    Regards
    Dr Web

     
    Dr_Web, Jan 18, 2008 IP
  10. Dr_Web

    Dr_Web Well-Known Member

    Messages:
    453
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #10
    Glitto, no problem, was my intention also :).
     
    Dr_Web, Jan 18, 2008 IP
  11. LawnchairLarry

    LawnchairLarry Well-Known Member

    Messages:
    318
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    118
    #11
    Dr Web, you can cloak any link you want. I suggest you to read this article about affiliate link cloaking. Many people find it annoying that a link opens in a new window, since it clutters up their screen and they can't use the back button. Using the target attribute you make a choice for other people, while most people prefer to make a choice themselves. That's why tabbed browsing was invented. Therefore it's better to replace the target attribute by the rel attribute.
     
    LawnchairLarry, Jan 18, 2008 IP
  12. Dr_Web

    Dr_Web Well-Known Member

    Messages:
    453
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #12
    Thank you very much for your help, rep added :).
     
    Dr_Web, Jan 18, 2008 IP
  13. LawnchairLarry

    LawnchairLarry Well-Known Member

    Messages:
    318
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    118
    #13
    Small correction: the values of the rel attribute need to be separated by a space, not by a comma or another type of punctuation. And the rel="index" attribute refers to the index-page and not to a page that needs to be cached! Hence, the tags your are looking for are:

    <a href="http://xxxxx.xxxxxxx.hop.clickbank.net" rel="nofollow">
    Code (markup):
    And if you want to replace the target attribute, that would be:

    <a href="http://xxxxx.xxxxxxx.hop.clickbank.net" rel="nofollow external">
    Code (markup):
    In the latter case, you should also include the following javascript in that page (thanks to Renoir):

    function externalLinks() {
     if (!document.getElementsByTagName) return;
     var anchors = document.getElementsByTagName("a");
     for (var i=0; i<anchors.length; i++) {
       var anchor = anchors[i];
       if (anchor.getAttribute("href") &&
           anchor.getAttribute("rel") == "external")
         anchor.target = "_blank";
     }
    }
    window.onload = externalLinks;
    Code (markup):
     
    LawnchairLarry, Jan 23, 2008 IP
  14. pauleastman007

    pauleastman007 Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    wow!, so simple i heard abt it . but dont know how to do it. Thanks man
     
    pauleastman007, Jan 23, 2008 IP