I'm trying to have the search result page not indexed.

/public/vendor/vaimo/theme-***/Magento_CatalogSearch/layout/catalogsearch_result_index.xml I have this:

<?xml version="1.0"?><page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <meta name="robots" content="NOINDEX,NOFOLLOW"/>
    <!-- Move Items -->
    <move element="breadcrumbs" destination="main.content" before="-"/>
    <move element="ajax.message.placeholder" destination="main.content" before="-"/>
    <move element="messages" destination="main.content" before="-"/>

But it still gets indexed.

  • add also this catalogsearch_advanced_result.xml May 7, 2019 at 7:20

1 Answer 1


Under your theme folder:

  • Magento_CatalogSearch/layout/catalogsearch_advanced_result.xml
  • Magento_CatalogSearch/layout/catalogsearch_result_index.xml

And add the following content to those files (same content for both):

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <meta name="robots" content="NOINDEX,NOFOLLOW"/>
  • I don't have catalogsearch_advanced_result.xml.
    – Kenneth
    May 7, 2019 at 7:24
  • copy that file and put in your theme May 7, 2019 at 7:25
  • path :- vendor/magento/module-catalog-search/view/frontend/layout/catalogsearch_advanced_result.xml May 7, 2019 at 7:25
  • Works now. Thank you!
    – Kenneth
    May 7, 2019 at 7:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.