Jump to content

How to make all amazon and avantlink buttons as no-follow

Recommended Posts

Posted

I browsed through some of the forums and I found this code which a moderator responded and said we need to include it in the code injection - footer section. Is that correct or it needs to be in the header section?

I wanted to check if this applies to all pages with buttons to amazon links? Also, how do you add no-follow for pages like avantlink? anyone has a custom code that they can share.

Here's what I included in my footer, but not sure if it applies for all pages?

 

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
$(document).ready(function() {
	$('[href*="amazon.com"]').attr('rel','nofollow');
});
</script>

 

  • Replies 4
  • Views 831
  • Created
  • Last Reply
Posted
15 hours ago, pashmina said:

I browsed through some of the forums and I found this code which a moderator responded and said we need to include it in the code injection - footer section. Is that correct or it needs to be in the header section?

I wanted to check if this applies to all pages with buttons to amazon links? Also, how do you add no-follow for pages like avantlink? anyone has a custom code that they can share.

Here's what I included in my footer, but not sure if it applies for all pages?

 

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
$(document).ready(function() {
	$('[href*="amazon.com"]').attr('rel','nofollow');
});
</script>

 

Yes. If you add to Footer, the code run on all pages.

Can you share link to a page where you added avantlink? We can help easier

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.