Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: Is it possible to hide some parts of the website from search engines?

Is it possible to hide some parts of the website from search engines?

Lisavdijk
Excursionist
24 0 23

Dear all,

 

Would like to know if it's possible to hide some parts of my website from search engines,

NOT the whole page / site, but just parts such as footer (Address)

 

I don't want that this website pops up when people type in the address in Google lets say.

I've asked chatgpt, it gave me the following code, but i can't add this in my footer (website editor)

{% unless request.path contains "bot" %}
<div class="footer-address">
  Your Address Information Here
</div>
{% endunless %}

Can anyone assist me on this one please?


Kind regards,

Lisa v Dijk

Replies 3 (3)

YvonRamazani
Shopify Partner
20 0 0

Hey Lisa, just to confirm, are you looking to noindex the addresses in the footer from search engines?

Lisavdijk
Excursionist
24 0 23

Hi Yvon,

 

Yes, I don't want to index the address in footer, so it won't pop up my website when people search on my address.

is this possible by any chance, I'm using the Dawn theme.

 

Thank you in advance,

 

YvonRamazani
Shopify Partner
20 0 0

Hey Lisa, in that case I recommend adding a noindex tag in each page of your footer 

 

you can do it directly with liquid : 

  1. Log in to your Shopify admin panel.
  2. Navigate to "Online Store" > "Themes".
  3. Find your current theme and click "Actions" > "Edit code".
  4. In the left sidebar, locate and click on the "theme.liquid" file under the "Layout" section.
  5. Find the closing </head> tag in the theme.liquid file.
  6. Just before the </head> tag, add the noindex code
  7. Click "Save" to apply the changes.

Finding Your Page Handle

To find the handle of the page you want to noindex:

  1. Go to "Online Store" > "Pages" in your Shopify admin.
  2. Click on the page you want to noindex.
  3. Look at the URL in your browser. The last part of the URL after "/pages/" is your page handle

 

Simple solution 

 

You can use a Shopify app like Noindexly to create noindex tag without having to code

 

Extract the list of links in your footer and then apply a noindex tag to those links.