How To nofollow ANY Link With Wix Code.

I am going to be developing an affiliate-link-heavy content-based website using Wix Code.

I would like to know if there is any way that I can make regular IN-LINE hyperlinks become no followed as per best practices required to avoid Google penalties. I am well aware of a feature request for which I have long voted, then re-voted and re-voted again (for some reason that voting button is highly unreliable and seems to forget so many of things I have voted for, but remembers some others, I dob’t get it), but I am seeking any other available workarounds in beta.

For all I care, this can be a per page or per site setting/piece of code that sets all my external links on the site or on that page to be no followed by default.

Additionally, I welcome any other ideas or possible workarounds such as using redirects or other hacks that could possible allow me to avoid the potential perilous situation with Google and 1000s of followed affiliate links…

I ask this out of desperation really, I also know free Wix sites have their external links all nofollowed by default so I am wondering if somebody can sprinke some advanced wisdom on us here that would help that case.

6 Likes

Hi,

You can add a hyperlink with a rel attribute using an HTML component .

Have a good day,
Tal.

Hi Tal,

This is in reference to an informational website. Using HTML module for every bit of text on a daily basis is a little bit counterproductive and perhaps too limiting for a “Wix” use. If I am going to hard code every block of text, why use Wix… see the reasoning hole there? So as a company response, it is a poor and unworthy canned response (please do not take this personal). It is one of those OLD WIX MINDSET responses that does not quite fit with the current direction and this beta program approach.

Anyway. This is what Google says about paid links, essentially saying if you do not rel nofollow your outgoing affiliate/paid links, it can get you penalized as it is considered attempting to manipulate PageRank.

And this exact answer you gave, is what Wix has said for years which makes little sense, other than to say it is clearly a sign that affiliate websites and affiliate marketers/ANY PAID LINKS are not welcome on the platform (I get it, there are major technical priorities, but I want you guys to see the external imagery), ie the platform will not allow you to do that stuff properly and the support behind it simply states that fact repeatedly.

I was aware of that option. Sadly, it does not apply to my use case. Moving this particular affiliate site project elsewhere. I was just hoping there was something new or a NEW WILLINGNESS to address this within Code functionalities perhaps, but there clearly doesn’t seem to be any political/technical/business WILL for this need at this time. I am not even going to make a feature request separately for Code because I know the answer is going to be the same and there is already a feature request for it anyway for a couple years now that does not seem to be getting anywhere.

This topic has also been brought up a number of times on the Wix Experts Facebook group to no avail.

Thanks anyways

1 Like

Hi Omid,

A bit coding is required, but how about using an option to create formatted text ?

Let’s say, for example, that I have a text component called ‘#text1’ that has a link to www.google.com:

See following code:

const originalHtml = $w('#text1').html;
console.log(originalHtml);
const indexToInsertRel = originalHtml.indexOf('<a') + 2; //2 is the size of '<a'
const newHTML = originalHtml.substring(0, indexToInsertRel) + ` rel="nofollow" ` + originalHtml.substring(indexToInsertRel + 1);
console.log(newHTML);

This will log the following:

Next thing to do is just reassign the new HTML to the component:

$w('#text1').html = newHTML;

Please note that this is a very simple case of going over a string and changing it.
You can find many resources on how to scan a string and change it (see for example How to find indices of all occurrences of one string in another in JavaScript)

Hope this helps,

Liran.

3 Likes

Hi Liran,

You spoke my language! The NEW WIX MINDSET just arrived again, haha.

At least this helps me with using regular text and button components instead of raw coding every single instance with its CSS inside of the html widget which would generally be too burdensome and defeats the entire purpose of speed and comfort with Wix. Mind you, I had plans in mind for a WIX AFFILIATE site can you imagine not being able to run one properly on Wix itself lol I would have looked like a TOTAL fool if I had to try to exclusively talk about and promote Wix on another platform (I have no interest in other platforms tbh, short of minor comparisons here and there on specific things, nor do I want to run a comparison site nor do I want to promote them)!

Since my tests so far have resulted in very promising conclusions with Wix affiliate program, I have become fully interested in running such a project on a daily basis. And you just so happened to help me regain some hope for doing it as I HAD NO IDEA this would have been possible without your detailed post. At least, this I can try and play with and find out if it works for my needs or not in a nice way or not.

Let me ask if you do not mind, we can do the same with text from/in blog posts, or other linkable elements such as buttons or images, right?

Also if you meant to provide me with more of your golden wisdom on that last link, it seems to be a broken link.

Thanks
Omid

Terrible. It would be much easier to add a nofollow option to a button (if this option existed after all these votes !). Why delve into js to just add a nofollow tag ? Also, all these custom solutions, are not at all compatible to many browsers. There are a 1000 options to change the colors, the fonts, but there is no option to add nofollow!

5 Likes

Believe me, I have voted at least 10x for this. Every time I go back to the feature request page for it, my vote is not counted. But I do know they are working on features, however, you are right and I agree that such a feature should not honestly be left to user vote as it appears to be a fairly straight forward button/toggle that needs to be defined and added to the URL settings box (new tab/same window settings screen, regardless of element.

But Wix leave these things to votes. And you know it, ain’t nobody but like 0.01% of Wix users have a need for nofollow links. So it is 2018 and we still do not have it and have to do all this to get it. Which I will personally do as it is the only way I have, but I admit this is entirely too much work for the purpose. However, in my case, it might just pay off. Rather niche and exclusive need.

1 Like

I am a blogger and this is something that is constantly troubling me. I too have voted on several occasions and I am still left waiting. I am afraid that I may have to switch platforms because I cannot risk a Google penalty. :\

3 Likes

I’m also interested in this, however the link would be in a button connected to a dataset.

Any idea ?

Would it work if i just put this into

Tracking Tools & Analytics?

affiliate link

Hey,

Some one know how to mange it on a button link?


Thanks,
Yair

1 Like

I’m replying just to say… its 2020 and still no follow option…

Looks like I made a big mistake signing up with Wix… They suck and I will start looking for somewhere else to move my site to…