Updated on Mar 13, 2019
Search Engines will craw your website in order to index all of your Store’s content and products. To make this process more efficient you can optimize your Magento 2 website by enabling Search Engine Friendly URLs (SEF URLs). This will also make your URLs easier to read by your customers and on websites when they are being shared. Usually this feature is enabled by default, but if you are not seeing the URLs as they should be you will have to re-enable it.
To activate the SEF URLs for your Store, you will need to first login to your admin dashboard and then navigate to the Stores → Configuration → Web section.
Now 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 store is installed in the root of your domain (http://domain.com) you will not have to perform any changes in this file. However, if your Magento store is located under a subdirectory (http://domainc.om/magento/) you will need to edit the .htaccess file by changing the following line:
Congratulations, your store now uses Search Engine Friendly URLs.