Magento 2.1.x. How to Enable and Use SEF URLs

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.

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.

zemez wordpress themes
  • To activate the SEF URLs for your store, you will first need to login to your Magento admin dashboard
  • Navigate to the Stores > Configuration section.
  • Then, click on the Web section and expand the Search Engine Optimization tab.
  • After, select Yes from Use Web Server Rewrites option dropdown.

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 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/


monster one