add a canonical tag to Advanced Search page?

  • Open
  • Pankaj Sharma
    Participant
    October 3, 2019 at 4:26 am #3292
    Pankaj Sharma

    I need to add a canonical tag to Advanced Search page. In my theme I have a folder Magento_AdvancedSearch. How can I add a canonical tag to this page via XML?

    Edit: I have made a file catalogsearch_index_index.xml with the code

    <?xml version="1.0"?>
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
    <title>Advanced Search - Test</title>
    <link rel="canonical" src="http://www.extenderstore.com.au/catalogsearch/advanced/" src_type="url"/>
    </head>
    <body>
    </body>

    But it doesn’t work. Any solution?