How to hide a page from the search engines in Shopify

A client asks me to hide a page from the search engines in shopify. I had done this with a custom robots meta tag. Today maybe you also want to hide a page from Google in the Shopify store.
Most users hide pages from search engines just because they don’t want to rank some pages such as thank you, private page, and landing page.
Learn how to add Alt text to images on Shopify?
What is Robots meta tag?
Robot meta tags are lines of code that tell crawlers how to crawl and index the content of web pages.
Hide a page from the search engines in shopify
You need to follow the below steps to hide a page from the search engines in Shopify.
Step 1: Login to shopify admin, go to Online Store > Themes.
Step 2: Find the theme you want to edit, and then click Actions > Edit code.

Step 3: Click the theme.liquid
layout file.

Step 4: To exclude a specific page, paste the following code in the <head>
section:
{% if handle contains 'ayurveda-consultations-treatments' %}
<meta name="robots" content="noindex">
{% endif %}
Step 5: Make sure that you replace “ayurveda-consultations-treatments"
with the correct page handle.

Step 6: Click Save.