Captured Technology

Overwriting the NoFollow Tag with DoFollow

Feb 13 2009

Overwriting the NoFollow Tag with DoFollow

DotNetNuke is the platform that 6 blogs are developed with that I am the administrator for. But the more I use Wordpress, the more I think I should convert them because of the great SEO and free plugin availability. With Wordpress there's a simple plugin that will change the default NoFollow rel tag on comments to DoFollow. This provides your readers the ability to gain links with Google and other search engines when they comment.

DNN recently upgraded their blog module and the new module is nice, but there's no way to change the NoFollow tags unless you change the source code and compile your own version. That is until I came upon this Javascript while searching Google that does exactly what I wanted to do. By running this script at the end of a page, it will find the NoFollow tags and convert them to DoFollow tags. That simple and my previously NoFollow blogs are now "U Comment, I Follow" blogs. I will be sticking with DNN for the time being, hoping newer versions will incorporate more Wordpress features.

if (document.getElementsByTagName) {
var aElements = document.getElementsByTagName("a");
for (var i=0; i<aElements.length; i++) {
var relvalue = aElements[i].rel.toUpperCase();
if (relvalue.match("NOFOLLOW") != "null") {
aElements[i].rel = "dofollow";
}
}
}

Blog Directory

Latest technology news.
 Steve Patterson
 411  245414  5/16/2017

FaceBook

Translate

Sponsors





Blog Calendar

Categories