{"id":452,"date":"2019-06-05T11:20:58","date_gmt":"2019-06-05T11:20:58","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2019\/06\/05\/prevent-google-from-indexing-magento-2-admin-url\/"},"modified":"2025-05-22T16:37:14","modified_gmt":"2025-05-22T11:07:14","slug":"prevent-google-from-indexing-magento-2-admin-url","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/prevent-google-from-indexing-magento-2-admin-url\/","title":{"rendered":"How to Prevent Google From Indexing Magento 2 Admin URL"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Google has employed its web crawlers to crawl and index the web pages in order to make it visible in search. However thankful we are for that, we don\u2019t want Google\u2019s bots to index certain pages of our Magento 2 store like admin URL, staging sites, or admin login page! The reasons may be either privacy, security or the pages are yet under development, but for implementing particular features, you had to connect it to the web!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, in the efforts to hide such pages from search engines like Google, we do not want it to affect the store\u2019s overall SEO too! Fortunately, search engines allow store owners to restrict which pages not to index!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For instance, to&nbsp;<em><strong>prevent Google from indexing Magento 2 admin URL<\/strong><\/em>, follow the simple method given below:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Method to Prevent Google From Indexing Magento 2 Admin URL:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Add the below code in&nbsp;<em><strong>app\/design\/adminhtml\/default\/default\/template\/page\/head.php<\/strong><\/em>&nbsp;file<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;meta name=\u201crobots\u201d content=\u201cnoindex\u201d \/&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To hide the Magento 2 admin login page from Google, add the similar code in&nbsp;<em><strong>app\/design\/adminhtml\/default\/default\/template\/login.phtml<\/strong><\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Easy and quick!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There\u2019s another method to hide Magento 2 pages from Google using the robots.txt file.&nbsp;<a href=\"https:\/\/meetanshi.com\/free-tools\">Create well-defined robots.txt<\/a>&nbsp;and the second method at&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/magento-2-robots-txt-meta-robots\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Configure Robots.txt and Meta Robots for Magento 2<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google has employed its web crawlers to crawl and index the web pages in order to make it visible in search. However thankful we are&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-452","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=452"}],"version-history":[{"count":3,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/452\/revisions"}],"predecessor-version":[{"id":15393,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/452\/revisions\/15393"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}