Hi , All of you guys it has been long since there has been debate on having nofollow or a dofollow tag in your links. Most of us do have a nofollow tag in our links which we post in our blogs . But these links also get noticed by Search Engines and backlink Checker sites and scripts so what is the idea behind having all this kind of drama behind this kind of tags.
While I was writing a PPP post in my blog I just read the conditions of the Advertiser , It was written clearly that We will not accept the “nofollow” tag at any cost . Thats why I just thought to take off the no follow tag out of my blog in all cases.
If any of you do not know how to take out the nofollow tag from your blog fully that is completely then you must note that what I am going to display here is editing the code of the core of Wordpress, better backup your Wordpress files before editing any of them .
You need to edit only one file if you want to remove the nofollow tag from the links of the blog and that particular file is “wp-includes/formatting.php” . Now you will ask me how to edit it .. For this you need to come to your Dashboard if you are going to edit it via Wordpress Interface or you need to download this particular file via FTP to edit on your local computer.
Now Some Code Stuff :
function make_clickable($ret) {
$ret = ' ' . $ret;
// in testing, using arrays here was found to be faster
$ret = preg_replace(
array(
'#([\s>])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is',
'#([\s>])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is',
'#([\s>])([a-z0-9\-_.]+)@([^,<\n\r]+)#i'),
array(
'$1<a href="$2" rel="nofollow“>$2′,
‘$1<a href=”http://$2″ rel=”nofollow“>$2</a>’,
‘$1<a href=”mailto:$2@$3″>$2@$3</a>’),$ret);
// this one is not in an array because we need it to run last, for cleanup of accidental links within links
$ret = preg_replace(”#(<a ( [^>]+?>|>))</a><a [^>]+?>([^>]+?)</a>#i”, “$1$3″, $ret);
$ret = trim($ret);
return $ret;
}
You would have to find out these lines in the formatting.php , Well I must tell you that these are lines no 626 and 627 where you need to delete the nofollow attribute so the above code looks like this one:
function make_clickable($ret) {
$ret = ' ' . $ret;
// in testing, using arrays here was found to be faster
$ret = preg_replace(
array(
'#([\s>])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is',
'#([\s>])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is',
'#([\s>])([a-z0-9\-_.]+)@([^,<\n\r]+)#i'),
array(
'$1<a href="$2" >$2',
'$1<a href="http://$2" >$2</a>',
'$1<a href="mailto:$2@$3">$2@$3</a>'),$ret);
// this one is not in an array because we need it to run last, for cleanup of accidental links within links
$ret = preg_replace("#(<a ( [^>]+?>|>))</a><a [^>]+?>([^>]+?)</a>#i", "$1$3", $ret);
$ret = trim($ret);
return $ret;
}
You must be noticing some difference in the above code . This is what is basic difference of the code .
Now some points worth mentioning are as follows
- You will be modifying the core WordPress Code in order to do this. These are simple edits, but it is a modification to core files.. That means, make back ups and test it, don’t just trust me. It works here, I’m using this on this blog right now. But it might come out differently for you and your configuration. I will not take any responsibility as such.
- This posts assumes you are using WordPress version 2.2.2. This will probably work fine with some other recent versions, but I make no promises, and won’t even think about looking at problems you run into until you are running 2.2.2.
- If you use a lot of plugins, and your web-host is giving you grief that is overload of server , low server speed and all that stuff, this is a start, but you may have other problems as well with other plugins.
- Every time you upgrade WordPress you will have to re implement these changes to remain a dofollow blog.(While upgrade your files will be replaced by the new ones.)
If you want to remove the nofollow tag from your comments then you will have to modify 2 other files in wp-includes folder as well, but I will not write about that , for that you can search internet or Blogosphere as well.
Now your hyperlinks are actually the dofollow type of links . So Enjoy ..
Disclaimer : Parts of the posts have been taken from various sources. The PHP Code has been taken from Blogstrokes.com
















Welcome to the DoFollow community dear!