How to set all external link as Nofollow?

tariqurrah
Shopify Partner
4 0 0

Recently I am designing https://irepart.com and there's a section on Homepage called as seen on where I have included some famous websites' logos with links. But I didn't find any option to set them as nofollow. I tried to find the Shopify community and Google but I am disappointed and didn't any solution.

Could you please inform me how to set all external links as nofollow?

Replies 4 (4)

magecomp
Shopify Partner
264 20 32

Hello @tariqurrah 

 

  1. Go to your Shopify admin dashboard and click on Online Store > Themes.
  2. Click the "Actions" dropdown menu for the theme you want to edit and select "Edit Code".
  3. In the left-hand sidebar, click on the "Layout" folder and select the "theme.liquid" file.
  4. Find the section of code where your external links are located, and add the rel="nofollow" attribute to each link tag as shown in the example above.
  5. Save the changes, and the external links on your website should now be set as nofollow.
<a href="https://example.com" rel="nofollow">Example Website</a>
Helping voluntarily. Please like and accept the solution if it helps. Thanks!
Our Bestseller Shopify Apps    |      Mobile App Builder by MageComp    |      Limit Qty Purchase

Need a developer?  Just visit MageComp website
tariqurrah
Shopify Partner
4 0 0

Thank you for your reply but unfortunately, I didn't find any link inside theme.liquid file. However, I fixed it by adding rel="nofollow" inside the section file in my theme called logo-bar.liquid as I am not using the default Shopify theme.

Daugirdas
Visitor
2 0 0

Could you please help me. Please find my code from social-media.liquid:

 

{%- capture social_media -%}
{%- if settings.social_facebook != blank -%}
<li class="HorizontalList__Item">
<a href="{{ settings.social_facebook | replace_first: 'https://', '' | replace_first: 'http://', '' | prepend: 'https://' }}" class="Link Link--primary" target="_blank" rel="noopener" aria-label="Facebook">
<span class="Icon-Wrapper--clickable">{%- render 'icon' with 'facebook' -%}</span>
</a>
</li>

 

What should I change in the code correctly to make Facebook link No Follow? Thank You very much!

tariqurrah
Shopify Partner
4 0 0

I am extremely sorry for late. I can see the Facebook link is set as No Opener. But if you want to change it to No Follow then just need to change from rel="noopener" to rel="nofollow". Full code should be look like below

{%- capture social_media -%}
{%- if settings.social_facebook != blank -%}
<li class="HorizontalList__Item">
<a href="{{ settings.social_facebook | replace_first: 'https://', '' | replace_first: 'http://', '' | prepend: 'https://' }}" class="Link Link--primary" target="_blank" rel="nofollow" aria-label="Facebook">
<span class="Icon-Wrapper--clickable">{%- render 'icon' with 'facebook' -%}</span>
</a>
</li>