pashmina Posted July 27, 2021 Share 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> Link to comment
tuanphan Posted July 28, 2021 Share 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 How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
pashmina Posted July 28, 2021 Author Share 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 Link to comment
mchere Posted September 24, 2021 Share 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! Link to comment
creedon Posted September 24, 2021 Share 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. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment