Introduction
The Magento 2 Hreflang Tags extension by FMEextensions helps to implement hreflang tags on your Magento store to ensure that search engines display the correct regional or language version of your pages based on the user's location or language preferences. This can greatly improve SEO by ensuring that the right content is served to the right audience, preventing content duplication issues and improving search rankings in multiple countries or languages.
Key Features
- Automatically generates hreflang tags for product, category, and CMS pages
- Supports multiple languages and regions (e.g., en-us, fr-fr)
- Customizable hreflang tag settings based on language or region
- Prevents content duplication issues and improves SEO
- Adds hreflang tags to HTML headers of pages
- Supports the x-default hreflang tag for default language redirection
Compatibility
This extension is compatible with the following Magento versions.
- 2.1.x
- 2.2.x
- 2.3.x
- 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.7
Installation Guide
Method 1
- Unzip fme_hreflang-tag-implementer-x.x.x.zip to a local folder.
- Make folder FME into your_magento_directory/app/code/ (if you don't find code folder within app folder, please create it first).
- Create the following folders (as mentioned in step 2):
- app/code/FME
- app/code/FME/HreflangTagImplementer
- Copy all the contents from fme_hreflang-tag-implementer-x.x.x to newly created HreflangTagImplementer folder.
- Now open console or shell.
- Go to your Magento directory and run the following commands:
- php bin/magento module:enable FME_HreflangTagImplementer
- php bin/magento setup:upgrade
- php bin/magento setup:static-content:deploy -f (-f may not work in Magento versions less than 2.2.x.)
- chmod command for var/ pub/static and generated/ folders
- Reload the Magento admin and you will see FME Extensions on the left side menu of your admin panel.
Method 2
- Unzip fme_hreflang-tag-implementer-x.x.x.zip to a local folder.
- Make folder FME into your_magento_directory/app/code/ (if you don't find code folder within app folder, please create it first).
- Create the following folders (as mentioned in step 2):
- app/code/FME
- app/code/FME/HreflangTagImplementer
- Copy all the contents from fme_hreflang-tag-implementer-x.x.x to newly created HreflangTagImplementer folder.
- Go to your_magento_directory/app/etc/
- Open config.php file in etc folder
- Add the following line in $modules array at the end ‘FME_HreflangTagImplementer’=>1,
- Now open console or shell.
- Go to your Magento directory and run the below commands
- php bin/magento setup:upgrade
- php bin/magento setup:static-content:deploy -f (-f may not work in Magento versions less than 2.2.x.)
- chmod command for var/ pub/static and generated/ folders
- Reload the Magento admin and you will see FME Extensions on the left side menu of your admin panel.