Forum:Remove "no follow" from an external link

As I read here, external links on wikis are, by default, using  (read this for more informations). Now, is there a way to remove the nofollow from a single link? I know it can be removed by all links, but I'm looking for a simpler way, like a template o a custom class. Thank you.


 * I don't think that's possible. It's not possible to set/reset "nofollow" via CSS, as far as I know. I've read that this is possible via JavaScript, but only if the link itself is created with JavaScript. But I'm not really good with JS, so I'm not sure about that. -- Weas-El ✉  23:07, November 16, 2011 (UTC)
 * It looks a bit contradictory to me that information from mediawiki. I think staff is needed to give a bit of a clearance on this subject wether or not the mediawiki file in place actually does act like this.
 * I therefor have added a staff needed category here.
 * Not a big issue (it is mainly about page ranking, so not that important), but nice to know about anyways.
 * .nofollow {display:none} in yout Common.css Lord Angel (talk) 18:13, November 19, 2011 (UTC)
 * Lord Angel, i do think that it is the objective to have a single weblink to be followed, indexed and adding to a website it's page ranking and that is not done by adding a no follow link to all weblinks. At least, in my opinion that is not the way to go.
 * Lord Angel, i do think that it is the objective to have a single weblink to be followed, indexed and adding to a website it's page ranking and that is not done by adding a no follow link to all weblinks. At least, in my opinion that is not the way to go.


 * Not sure why the Staff Needed tag was added, but I will endorse WikiPim's statement. It's not good practice to apply it wiki wide. You could use page specific CSS if you really did want just one or two pages to be "follow" links - . --daNASCAT http://images2.wikia.nocookie.net/__cb32675/wikia/images/e/e9/WikiaStaff.png (help forum | blog) 02:11, December 14, 2011 (UTC)


 * It doesn't seem to work... (is "nofollow" a class?) I need to remove the nofollow from a specific part or a single page, so is possible to do the same with something like ? Until now I used a mediawiki page and verbatim tags.


 * I'm not sure how that is supposed to work, anyway. In layman's terms, CSS is "layout control" - but the nofollow attribute of links is not an element on the "layout level", but one on the "content level". For "content control", you'd need to either change the HTML code of a page directly (which you can't), or via a JavaScript fragment (which is possible, but not useful for something that is, basically, a command for bots that typically don't execute JavaScript). The important question is: Why do you want to remove "nofollow"? What is it that you are trying to achieve? -- NablaOperator 15:10, December 14, 2011 (UTC)


 * I have already solved the issue by creating the links without the "nofollow" in a mediawki page, so I was interested in daNASCAT's solution since it's neater. The reason I want to remove the "nofollow" is simple: I want to remove it from the list of the affiliated sites which demand to remove it to return the favor.


 * daNASCAT usually is too short in his answers, thinking that everyone understand instantaniously that he refers to CSS when he is using class referrals.
 * You should add this information to either (or both) wikia.css and common.css on your wiki, purge the css file changing the url when editing from &action=edit to &action=purge and reloading the page you want it to happen on.
 * However, even tough it is purged it might take some time to have effect due to crawler activity. Also if you are doing this for linkback reasons i really doubt that it is needed. Linking back from Wikia is never needed for neutral point of view information and wiki's are meant to be encyclopedia like pages about a certain subject. If it's fanfiction it might be different tough. But even then i highly doubt the need for them to be uplifted in pageranking by wiki links.

(reset indent) Removing the "nofollow" is necessary only in the main page (or rather in a template). I already added the code to my wiki css but it didn't remove the "nofollow" attribute (I checked with firebug). Isn't it because the nofollow is an attribute and not a css class? How can it work in the first place?
 * nofollow is an attribute, not a class, so it cannot be removed with CSS, unless some magic has happened which I was not aware of.  is how nofollow is given to a link, but CSS does NOT recognise , so it cannot remove it from an element in any way. I'd assume you could probably use Javascript to remove nofollow, though.  20:05, December 14, 2011 (UTC)


 * CSS would recognize a[ref="nofollow"] as a selector, but that's not what we're trying to accomplish here. Removing rel= from a link can only be done via JS and I believe that most crawlers load pages WITHOUT JS. Bottom line is, unless Wikia makes a way to not have rel=nofollow added to an external link, you can't do what you're wanting. Rappy 21:02, December 14, 2011 (UTC)

After some attempts, I did it with JS: I also added a script to open external links on a new window. Is the code ok? (I mean as browser compatibility).