1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How To Automatically Open External Links in a New Page And Set The Nofollow Tag in Blogger

Discussion in 'Blogging' started by bobymax909, Aug 9, 2018.

  1. #1
    External links One of the inevitable components of blogging is to explain or download a file but there are two problems associated withexternal links:

    • Open the link in blog window and this makes the visitor leave the blog and may still be reading
    • External links become Dofollow which negatively affects the blog that has its most presence
    Of course, there is a manual way to make external links open in a new page, which is to be given the Nofollow tag An example of a link will open in a new page with a Nofollow tag :
    SEMrush
    <a href='#'target="_blank"rel="nofollow">Example</a>
    Code (markup):
    The manual method is the best, you do not need to install the codes.But there are those who did not know those things and his blog is full of links and can not modify them all, So The solution is to put this code in your Template:

    Step 1: Go To Blogger.com>>Template>>Edit Template
    search for the</body>tag and copy paste the code bellow before it
    <script type='text/javascript'>
    $(document).ready(function() {
    $("a[href^='http://']").each(
    function(){
    if(this.href.indexOf(location.hostname) == -1) {
    $(this).attr('target', '_blank');
    $(this).attr('rel', 'nofollow');
    }
    }
    );
    $("a[href^='https://']").each(
    function(){
    if(this.href.indexOf(location.hostname) == -1) {
    $(this).attr('target', '_blank');
    }
    }
    );
    });
    </script>
    Code (markup):
    That's All,
     
    bobymax909, Aug 9, 2018 IP
    SEMrush
  2. Threadsp

    Threadsp Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    Not sure if its right place to ask. Is it really good idea to do nofollow for external link? does it help or hurt your sites?
     
    Threadsp, Sep 5, 2018 IP
  3. MilesWeb

    MilesWeb Well-Known Member

    Messages:
    856
    Likes Received:
    33
    Best Answers:
    7
    Trophy Points:
    123
    #3
    There is nothing wrong in using nofollow for external links. Here are some advantages of using no-follow links.
    • Using a no-follow tag you tell search engines that your blog or website has no relation to the other site.
    • By doing so, you save yourself from being linked to bad or spammy websites.
    • In case, you have paid links you can protect yourself from getting penalized from Google by using no-follow links.
     
    MilesWeb, Jan 7, 2019 IP