- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
Magento 2.x. How to enable and use SEF URLs
July 26, 2016
Search engine friendly (SEF), human-readable or clean URLs are URLs that make sense to both humans and search engines, because they explain the path to the particular page they point to. It is an essential part of your website optimization and promotion in search results rankings, especially if you are running a store.
Magento 2 engine supports this feature to full extent, and in this tutorial you will get to know how to use it. Usually SEF URLs feature is enabled by default, but in case you see the links containing hard-readable symbols and digits or index.php title, you should re-enable this feature.
- To activate the SEF URLs for your store, you will first need to login to your Magento admin dashboard and then navigate to the Stores > Configuration > Web section.
- Afterwards simply select Yes from the drop-down menu on the Use Web Server Rewrites option.
Magento uses the Apache mod_rewrite to create the SEF URLs. If your Magento 2 store is installed in the root of your domain (http://domain.com) you don’t have to perform any changes in this file and the feature is enabled successfully.
However, if your Magento 2 store is located under a subdirectory (http://domain.com/magento/) you need to edit the .htaccess file by changing the following line:
#RewriteBase /magento/
to
RewriteBase /your-magento2-folder-here/
This is the end of the tutorial. Now you know how to enable this useful and effective feature in Magento 2.x store themes.
Feel free to check the detailed video tutorial below:
Magento 2.x. How to enable and use SEF URLsIn case you need more templates, look through our large scale of professional Magento Themes.