Vince at RockPOS.com Posted November 23, 2015 Share Posted November 23, 2015 Dear Prestashopers, My client using a blog module to manage their content. But after posting a lot of post, they saw that there are a lot of external link. Is there any way to add "no-follow" attribute to all external links on their site? Link to comment Share on other sites More sharing options...
garciasanchezdani Posted November 23, 2015 Share Posted November 23, 2015 (edited) Hi mate, you can add some javascript, and play with this line: $('a[href^="http"]:not([href*="YOURSITE.com'])").attr('rel','nofollow'); where you look for all <a> tags which start with "http", but not your own domain...and add the nofollow attribute... Regards, Edited November 23, 2015 by garciasanchezdani (see edit history) 1 Link to comment Share on other sites More sharing options...
Vince at RockPOS.com Posted November 25, 2015 Author Share Posted November 25, 2015 (edited) Thank you garciasanchezdani! It work well. Hi mate, you can add some javascript, and play with this line: $('a[href^="http"]:not([href*="YOURSITE.com'])").attr('rel','nofollow'); where you look for all <a> tags which start with "http", but not your own domain...and add the nofollow attribute... Regards, Edited November 25, 2015 by Vince at RockPOS (see edit history) Link to comment Share on other sites More sharing options...
edututi Posted July 22, 2016 Share Posted July 22, 2016 I know this topic is resolved, but can you please tell me where exactly do you insert that javascript code? Thanks Link to comment Share on other sites More sharing options...
Php Ninja Posted June 23, 2020 Share Posted June 23, 2020 This is not good. Google will not see those nofollows, this is totally useless. You should go links one by one to set the rell no follow. Maybe through mysql you can update multiple contents at once. But jQuery won't help on that. Link to comment Share on other sites More sharing options...
OKEIwebbureau Posted March 3, 2021 Share Posted March 3, 2021 Is this still working? $('a[href^="http"]:not([href*="YOURSITE.com'])").attr('rel','nofollow'); ...if yes, then how can it be added to prestashop? Thanks 🙂 Link to comment Share on other sites More sharing options...
Nickz Posted March 7, 2021 Share Posted March 7, 2021 It is no very smart to declare all out going links nofollow. Link to comment Share on other sites More sharing options...
OKEIwebbureau Posted March 8, 2021 Share Posted March 8, 2021 I agree Nickz, but having moer than 10,000 outgoing dofollow links doesn't help on SEO as well. So it would be nice to give all external links a nofollow, and then still have some links excluded (keeping them as dofollow). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now