In order to configure Magento 2 Alternate Hreflang Extension navigate to Stores > Configuration > Magefan Extensions > Alternate Hreflang.

Magento 2 alternate hreflangs section


1. Enable or Disable the extension.

2. Enter the Product Key which you will be able to find in your Magefan account after purchasing the module.

3. Choose the pages you want the Hreflang Tags to be enabled on.

Alternate hreflang general configuration

Locale Options

1. In case you have a website with several store views in languages that have different region variants (e.g. American English, British English, Australian English, French in France and French in Canada) you need to enable the Locale Depends On Region option in order to assign a certain store view to the region. 

Once you enable the Locale Depends On Region, one more option will be available for you.

2. If you are not able to set the locale for your store view since there simply is no such locale in Stores > Configuration > General > Locale Options > Locale (e.g. en-FR, en-MY or en-SG), add your Custom Locale Code

Note: this field is optional.

3. In case you manage several websites, each of which has multiple store views and don't want the alternate tags from each website to be shown on the others set the Locale Group you want the website to restricted to. If you just have one website, set the Local Group to the Default Group 1.

4. Choose the language in the et the hreflang="x-default" value for users whose browser settings don't match the available language or region.

Alternate Hreflang Options in Magento 2

Once all the settings have been set don't forget to press the Save Config button.

Alternate hreflangs configuration save