Categories

Featured templates

Magento 2.x. How to enable and use SEF URLs

Tyler Warren July 26, 2016
Rating: 5.0/5. From 2 votes.
Please wait...

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.

  1. 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. Magento_2.x._How_to_enable_and_use_SEF_URLs_1
  2. Afterwards simply select Yes from the drop-down menu on the Use Web Server Rewrites option. Magento_2.x._How_to_enable_and_use_SEF_URLs_2

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/
Magento_2.x._How_to_enable_and_use_SEF_URLs_3 Magento_2.x._How_to_enable_and_use_SEF_URLs_4

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 URLs

In case you need more templates, look through our large scale of professional Magento Themes.

Magento Ecommerce Themes
This entry was posted in Magento Tutorials and tagged links, magento2, SEF URLs. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket