Forums

Add rel="nofollow" to <!--more--> tag link (6 posts)

  1. jmraab
    Member
    Posted 5 years ago #

    Can someone offer direction as to how to add a rel="nofollow" tag to the "Read More" link that occurs in my posts? I do not want Google indexing these links.

    Thanks in advance for your help.

    Jeff

  2. Otto
    Tech Ninja
    Posted 5 years ago #

    Why would you not want Google to index those pages in particular?

    Anyway adding a nofollow to the link is not the right way to prevent that sort of thing. If you want to stop Google from indexing certain pages, use a robots.txt file.

  3. jmraab
    Member
    Posted 5 years ago #

    Let me rephrase. From an SEO perspective, I do not want Google to give any value to the "Read More" link.

    The Read More link points here:
    http://www.domain.com/post-name/#more-17

    The problem is that I would need to add some type of /#more wildcard to the robots.txt file, but because each post is unique (/#more-17, /#more-18, etc) I don't think there is an easy way to do this.

    The title already links to the permalink for the post, so I don't need all of the /#more pages in Google's index.

  4. jmraab
    Member
    Posted 5 years ago #

    Okay, I found the fix for this. Here is what I edited:

    in wp-includes/post-template.php I edited line 102 to include class=\"more-link\" within the link structure.

    The only problem with this workaround is that whenever I upgrade, I'll need to also make this hack in the new files. Maybe something for WP developers to consider?

  5. Otto
    Tech Ninja
    Posted 5 years ago #

    I would expect Google to be smart enough to know that
    http://www.domain.com/post-name/#more-17 and
    http://www.domain.com/post-name/ both point to the same page. The #whatever is a standard way of pointing to the interior of a page, Google is not going to treat it as a separate URL.

    You can add the nofollow if you want, but it doesn't achieve what you think it does.

  6. ravetildon
    Member
    Posted 4 years ago #

    But it will bleed off page rank juice to that URL even if it doesn't index it. So it's just one more step to getting those # 1 rankings.

Topic Closed

This topic has been closed to new replies.

About this Topic