Streaming live at 10am (PST)

Adding no follow links through webflow CMS


#1

I understand it’s not currently possible to individually add no-follow tags to certain links in webflow CMS.

However, we publish a lot of blog content that includes some affiliate links through to amazon.

Is it possible to somehow add in some sort of blanket rule for my site that adds a no-follow tag to all amazon affiliate links?


#2

I would greatly appreciate an answer on this too.


#3

@Waldo any ideas of who to speak to about this? :slight_smile:


#4

If all hrefs with amazon string inside - should be with rel="nofollow" very small custom code could solve this:

before body 1/2

Select all href contain amazon string

/*   *= is contains   */
var noFollowLinks = $('a[href*="amazon"]')

before body 2/2

The attr() method sets attributes and values for selected elements.

noFollowLinks.attr('rel', 'nofollow');

http://api.jquery.com/attr/

Summary (copy-paste)

<!-- change all amazon hrefs to nofollow -->
<script>
  var noFollowLinks = $('a[href*="amazon"]')
  noFollowLinks.attr('rel', 'nofollow');
</script>

Publish your site --> Live url - inspect code and see the rel=“nofollow”.

  • If not “all” amazon links should be with nofollow add example (Same idea - another selector).