Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search

How to add "Nofollow" for image and button links?


Recommended Posts

Hi, 

I am trying to understand:

I was under the impression that you want most of your external links to be no follow but all of your internal links to your own site to be followed. So would you need the opposite scenario from above? Everything no follow except for links to your own site? How would you make an exception for an external link you are providing back links for, for example if you had a guest blog post or links to a copywriter you want your clients to work with?

Edited by Aquariumguy
Link to post
  • 1 month later...
  • Replies 28
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Having the option within the WYSIWYG editor to set the appropriate rel= info is actually very important. The rel=nofollow and rel=sponsored attributes play a critical role for Google. We love the Squa

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

Which plan do you use? If you use Business Plan, you can use some custom code to add rel="nofollow" to all image/button links. Can you share link to your site?

Posted Images

@tuanphanI cannot thank you enough for providing this solution. Nofollow and sponsored links have been a problem for me for three years -- I kept hoping Squarespace would provide a solution. Your code will save me SO MUCH time. Again, I cannot thank you enough!!!!

Link to post
On 4/5/2021 at 1:53 AM, cavitee said:

Hi,

I wonder if anyone can help me with a code which can nofollow multiple root sites. For example there are various pages i mention 2 different sites (ebay and amazon) which i want to set as nofollow. Can i just follow the same script but place "amazon.co.uk" (and a comma or something) before putting "ebay.com" like below?


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

@cavitee

 

Using commas to separate multiple sites did not work for me. However, this format worked:

<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','sponsored');
    $('[href*="ebay.com"]').attr('rel','sponsored');
});
</script>

I hope this is correct, @tuanphan!
 

Link to post
  • 2 weeks later...
Posted (edited)

Hi All 🙂

Thanks for solving this. It also works for adding a tooltip to a button or link as follows:-

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>

$(document).ready(function() {
     $('[href*="amazon.com"]').attr('title' , 'Your tooltip text here');
});
</script>

Now when you hover over any button or link that points to amazon.com the tooltip appears.

Regards,

Simon.

 

Edited by SBuxton
Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...