{"id":72,"date":"2017-04-19T12:30:26","date_gmt":"2017-04-19T07:00:26","guid":{"rendered":"http:\/\/www.hiddentechies.com\/blog\/?p=72"},"modified":"2020-03-13T16:03:37","modified_gmt":"2020-03-13T10:33:37","slug":"how-to-hide-a-magento-2-page-from-google","status":"publish","type":"post","link":"https:\/\/www.hiddentechies.com\/blog\/tutorials\/how-to-hide-a-magento-2-page-from-google\/","title":{"rendered":"How to Hide a Magento 2 Page From Google"},"content":{"rendered":"<p>Do you want to hide a Magento 2 page from Google? Sometimes you may need to hide a page from Google to protect your privacy or to keep away unwanted users. In this article, we will show you how to hide a Magento 2 page from Google without affecting your site\u2019s overall SEO.<\/p>\n<p><strong>Hiding a Magento 2 Page From Google<\/strong><\/p>\n<p>Search engines like Google allow website owners to exclude content from search results. You can do this by using your site\u2019s robots.txt file or using HTML meta tags.<\/p>\n<p>We will show you how to do this in Magento 2 using two methods. You can choose the one that works best for you.<\/p>\n<p><strong>Method 1: Hide a Magento 2 Page from Search Engines Using Magento 2 Backend<\/strong><\/p>\n<p>This method is easier and recommended for Magento 2 beginners.<\/p>\n<p>1) To hide CMS page for your Magento 2 Store, you will need to login to your admin area and navigate to the<strong> Content &gt; Pages<\/strong> section.<br \/>\n2) Select the page you want to hide and click on EDIT.<br \/>\n3) Find and expand <strong>Design<\/strong> Tab.<br \/>\n4) Add below code to &#8220;Layout Update XML&#8221;.<\/p>\n<pre class=\"lang:default decode:true \">&lt;head&gt;\r\n    &lt;meta name=\"robots\" content=\"NOINDEX,NOFOLLOW\"\/&gt;\r\n&lt;\/head&gt;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-76\" src=\"http:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2017\/04\/hide-a-magento-2-page-from-google-1.png\" alt=\"How to Hide a Magento 2 Page From Google\" width=\"944\" height=\"267\" srcset=\"https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2017\/04\/hide-a-magento-2-page-from-google-1.png 944w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2017\/04\/hide-a-magento-2-page-from-google-1-300x85.png 300w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2017\/04\/hide-a-magento-2-page-from-google-1-768x217.png 768w, https:\/\/www.hiddentechies.com\/blog\/wp-content\/uploads\/2017\/04\/hide-a-magento-2-page-from-google-1-676x191.png 676w\" sizes=\"(max-width: 944px) 100vw, 944px\" \/><\/p>\n<p>5) Save the page.<\/p>\n<p><strong>Method 2: Hide a Magento 2 Page from Search Engines Using robots.txt File<\/strong><\/p>\n<p>This method requires you to edit the robots.txt file. Adding incorrect instructions in this file can have adverse affect on your site\u2019s SEO, which is why it is not recommended for Magento 2 beginner users.<\/p>\n<p>The robots.txt file is a configuration file that you can add to your Magento 2 site\u2019s root directory. It allows a website to provide instructions for search engine bots, hence the name robots.txt.<\/p>\n<p>You can edit robots.txt file by connecting to your website using an FTP client or \u2018File Manager\u2019 in your Magento hosting cPanel.<\/p>\n<p>You will need to add these lines to your robots.txt file.<\/p>\n<pre class=\"lang:default decode:true \">User-agent: *\r\nDisallow: \/your-page\/<\/pre>\n<p>The user-agent line allows you to target specific bots. We are using asterisk sign to include all search engines. Don\u2019t forget to save your changes and upload robots.txt file back to your server.<\/p>\n<p>That\u2019s all, we hope this article helped you learn how to hide a Magento 2 page from Google.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Do you want to hide a Magento 2 page from Google? Sometimes you may need to hide a page from Google to protect your privacy or to keep away unwanted users. In this article, we will show you how to hide a Magento 2 page from Google without affecting your site\u2019s overall SEO. Hiding a&#8230; <\/p>\n<div class=\"actions\"><a href=\"https:\/\/www.hiddentechies.com\/blog\/tutorials\/how-to-hide-a-magento-2-page-from-google\/\">Continue Reading<\/a><\/div>\n","protected":false},"author":1,"featured_media":4734,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,2],"tags":[16,31,9,10,32,27],"_links":{"self":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/72"}],"collection":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/comments?post=72"}],"version-history":[{"count":5,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/72\/revisions"}],"predecessor-version":[{"id":10541,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/posts\/72\/revisions\/10541"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/media\/4734"}],"wp:attachment":[{"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/media?parent=72"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/categories?post=72"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hiddentechies.com\/blog\/wp-json\/wp\/v2\/tags?post=72"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}