5

As per SEO expert I need to have domain url as canonicalurl. As per magento 2 settings doesnt allow it to be empty. attached screenshot shows same. I get https://www.portablerestroomtrailers.com/homepage. It should be https://www.portablerestroomtrailers.com/ enter image description here

0

Create app/design/frontend///Magento_Cms/layout/cms_index_index.xml

And Add this into it

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <link rel="canonical" src="https://www.yourdomain.com" src_type="url" />
    </head>
</page>
2
  • there is no folder Magento_CMS. should i create one? – Amol Bhandari SJ Sep 21 '20 at 14:28
  • No need. Just create cms_index_index.xml in any layout folder – Nilesh Dubey Sep 21 '20 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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