0

I have a problem where my SEO tool finds /catalogsearch/advanced as no canonical link. I tried doing this link, which is basically the same question, but It wouldn't work for me, even after recompiling the whole shop and clearing the cache.
So, basically, I need to add a canonical link to /catalogsearch/advanced, but I can't get it to work. I tried editing the catalogsearch_advanced_result.xml, catalogsearch_advanced_index.xml and catalogsearch_result_index.xml Here's a piece of the code for catalogsearch_advanced_index:

<?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>
    <link rel="canonical" src="https://mainpage.com/catalogsearch/advanced" src_type="url"/>
</head>
<body>
</body>

1 Answer 1

0
<reference name="head">
    <action method="removeItem">
        <type>link_rel</type>
        <name>https://mainpage.com/catalogsearch/advanced</name>
     </action>
</reference>
1
  • Hey, Im kindda new, do I put that in the catalogsearch_advanced_result.xml or catalogsearch_advanced_index.xml? Also, inside which XML tags?
    – Simon
    Mar 21, 2022 at 8:01

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.