How to remove index.php from url in Magento 2

Admin

After fresh Magento installation usually we can see index.php in url for both frontend and backend.

Magento by default provides setting for this

Login to Magento admin panel
Then Go to Store -> Configuration

Then goto General -> Web -> Search Engine Optimization.
Select proper scope as per your need.

Change Setting Use Web Server Rewrites -> Yes

Once you are done with change Save the configuration and you will be automatically logged out !

You are done ! 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *