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">
    <title>Advanced Search - Test</title>
    <link rel="canonical" src="http://www.extenderstore.com.au/catalogsearch/advanced/" src_type="url"/>

But it doesn't work

1 Answer 1


Create a file catalogsearch_advanced_index.xml and place it in the layout folder of Magento_CatalogSearch in your theme. Use the same code in the question.

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.