We run a magento 2 multistore in 2 langauges where default store view is german. Online shop is also available in french. Store code is added to URLs like the following:
www.domain.at
www.domain.at/de
www.domain.at/fr
When it comes to SEO we have the problem of duplicate content because the default store is available with AND without store code in URL
. The following urls show the same content:
www.domain.at/de
www.domain.at/
In fact we need same behavior like here for magento 1: Magento remove "default" store code from urls
Does anyone know how to fix this issue?
Best Answer
registration.php
etc/module.xml
etc/adminhtml/system.xml
Default option value is No
etc/config.xml
Helper/Data.php
etc/di.xml
Plugin/Model/HideDefaultStoreCode.php
My Plugin for hide Default Store Code - https://github.com/alex-79/magento2-hide-default-store-code-from-url