pashmina Posted July 27, 2021 Posted July 27, 2021 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>
tuanphan Posted July 28, 2021 Posted July 28, 2021 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!)
pashmina Posted July 28, 2021 Author Posted July 28, 2021 Thank you @tuanphan. What about for avantlink do you have a custom code for buttons for that? Can I add in the same code? Here's my page on one of the buttons - I link to avantlink but I want it for all pages: https://www.thegonegoat.com/gear/womens-cycling-kits
mchere Posted September 24, 2021 Posted September 24, 2021 Hi there, I added the same code to my footer to my site to make all amazon links no-follow. But I can't seem to tell if it is working or not. Would someone be able to take a look? http://redarrowmedia.com/ THANK YOU!
creedon Posted September 24, 2021 Posted September 24, 2021 @mchere You would need to change amazon.com in the code to amzn.to to work with the links on your site. Assuming all your links are of the style amzn.to. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.