Help with NoFollow links

Status
Not open for further replies.

LilJohn187

Junior Member
Joined
May 15, 2017
Messages
108
Reaction score
4
Hey guys i need help with turning NoFollow links to index and follow. I use Yoast SEO for my ecommerce site and some links/pages on my website have been set automatically to Nofollow but i want them to be followed. any help will be greatly appreciated
 
What kind of links ? Need more info.
 
Hey guys i need help with turning NoFollow links to index and follow. I use Yoast SEO for my ecommerce site and some links/pages on my website have been set automatically to Nofollow but i want them to be followed. any help will be greatly appreciated
1) You need to go to your coding and manually do the do follow to your links.
2) You may set the rule by creating a function in the header section so all links will become do follow.
3) You already have tried with YOAST SEO plugin (this should probably works)
4) let me know of the full details of your website technology etc. so that i can provide you the solution.
 
1) You need to go to your coding and manually do the do follow to your links.
2) You may set the rule by creating a function in the header section so all links will become do follow.
3) You already have tried with YOAST SEO plugin (this should probably works)
4) let me know of the full details of your website technology etc. so that i can provide you the solution.

I am not much of a code. so be precise on how i can edit the code and also how do i set the rule in the header.php
Below are the technologies used by the website
Apache web server
Google Analytics UA
Google Font API
HTTP/2
PHP 5.6.30
WooCommerce 3.0.6
Wordpress 4.7.4
Yoast SEO
JQuerry
Modernizr
Twitter Emoji (Twemoji)
PrettyPhoto
thanks for the assistance VOW Tech
 
What kind of links ? Need more info.

Its weed dispensary. so some likes are not being followed, links like the one below

a href links with" rel="nofollow"

How to i fix this
 
I am not much of a code. so be precise on how i can edit the code and also how do i set the rule in the header.php
Below are the technologies used by the website
Apache web server
Google Analytics UA
Google Font API
HTTP/2
PHP 5.6.30
WooCommerce 3.0.6
Wordpress 4.7.4
Yoast SEO
JQuerry
Modernizr
Twitter Emoji (Twemoji)
PrettyPhoto
thanks for the assistance VOW Tech
Open your wordpress function.php file and type the following code in this file

function strip_nofollow($text = '') {
return preg_replace_callback("/<s*as+(.+?)>/is", 'strip_nofollow_callback', $text); }
function strip_nofollow_callback($match) {
$attr = $match[1];
$attr = " $attr ";
$attr = preg_replace("/
s
rels*=s*(['"])
([^1]*?s+)?
nofollow
(s+[^1]*?)?
1
/ix", " rel=$1$2$3$1", $attr);
$attr = preg_replace("/
s
rels*=s*(['"])s*1
/ix", '', $attr);
$attr = trim($attr);
return '<a ' . $attr . '>';
} add_filter('the_content', 'strip_nofollow', 15);

The above function does not make any changes in the core or in the wordpress database, it simply changes all the occurrence of no-follow tags into do-follow tags.
 
function strip_nofollow($text = '') {
return preg_replace_callback("/<s*as+(.+?)>/is", 'strip_nofollow_callback', $text); }
function strip_nofollow_callback($match) {
$attr = $match[1];
$attr = " $attr ";
$attr = preg_replace("/
s
rels*=s*(['"])
([^1]*?s+)?
nofollow
(s+[^1]*?)?
1
/ix", " rel=$1$2$3$1", $attr);
$attr = preg_replace("/
s
rels*=s*(['"])s*1
/ix", '', $attr);
$attr = trim($attr);
return '<a ' . $attr . '>';
} add_filter('the_content', 'strip_nofollow', 15);

Hey VOW Tech, I used the code like you said. I added it at the end of my functions.php file but it crashed the whole site.
I restored the site with the backup i made.
I don't know how to proceed from here
 
Can you please tell me the steps you followed while adding this code. If you are getting trouble while adding the same you may consider adding some plugins which are available free online.
 
Can you please tell me the steps you followed while adding this code. If you are getting trouble while adding the same you may consider adding some plugins which are available free online.

1) I copied the code you gave
2) logged into my wordpress account
3) Located Editor under Appearance
4) from Editor i choose theme function (functions.php)
5) I made a backup of the function.php file
6) I added the code you gave me at the end of the functions.php
7) I clicked save

Those are the steps i followed, but it didn't work for me
Honestly VOW, i appreciate you help
 
No that, Make all links ******** makes your OBL higher which may affects on your ranking.
 
Please can you explain further

OBL means outbound links, in a simple term, a do-follow link to external website. Now what I mean, if your page or your site has too much OBL rather then internal links, then it seems as link farming or link selling websites to most of the search engines. Thus, the theme author generally creates a theme with some built in no-follow functions to external links to make them natural. :)
 
OBL means outbound links, in a simple term, a do-follow link to external website. Now what I mean, if your page or your site has too much OBL rather then internal links, then it seems as link farming or link selling websites to most of the search engines. Thus, the theme author generally creates a theme with some built in no-follow functions to external links to make them natural. :)

so in actual sense, you mean i should reduce the amount of products i have on the website. is that so
 
No, I don't suggest to reduce the products, just wanna remind a note that, when you add excessive links some other sites, just make sure, a no-follow tag inserted within the links. You can add 100 of external links, no limitation on that, but it'll not be a wise choice that 100 of those links has a do-follow attribute :-)
 
Status
Not open for further replies.
Back
Top