any way to make my internal link dofollow without plugin.
It looks like your links are already “dofollow” (sic) by the absence of any nofollow
values in the rel
attribute.
All links will be followed, unless you take specific steps to add the “nofollow” attribute.
Ive used no follow plugin for external link & even script
function add_nofollow_content($content) {
$content = preg_replace_callback('/]*href=["|\']([^"|\']*)["|\'][^>]*>([^<]*)<\/a>/i', function($m) {
if (strpos($m[1], "YOUR_DOMAIN_ADDRESS") === false)
return '<a href="'.$m[1].'" rel="nofollow" target="_blank">'.$m[2].'</a>';
else
return '<a href="'.$m[1].'" target="_blank">'.$m[2].'</a>';
}, $content);
return $content;
}
add_filter('the_content', 'add_nofollow_content');
bt still moz reports 85.9% follow
I’m unclear what you’re asking here. As I understand it:
- You are using a plug-in to add “nofolllow” to external links
- You are not adding “nofollow” to internal links.
- You don’t want “nofollow” on internal links.
What is the issue with which you need assistance?
- You are using a plug-in to add “nofolllow” to external links
As plug-in doesnt work so ive 2 abondon
I don’t want “nofollow” on internal links but want “nofollow” on internal links.
That doesn’t make sense.
Are you asking how to add “nofollow” to external links only without using a plug-in?
I think you have a typo in that post
Anyway, I think you may have better luck with thinking of links in a different context. Instead of internal vs. external, think admin posts vs. visitor comments.
In other words, all links that you post will not have nofollow, but all user submitted comments will have nofollow. That way, if you don’t think a page deserves a link, you don’t post the link. And having nofollow comment links might help reduce comment spam some.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.