Steps to Remove Index.php from a URL in Magento 2:
- Log in to Admin panel
- Navigate to Stores > Configuration > General > Web
- Expand the Search Engine Optimization section
- Set “yes” to Use Web Server Rewrites option.
- Further, expand the Base URLs (Secure) section
- Set “yes” to Use Secure URLs on Storefront
![](https://therealprogrammer.com/wp-content/uploads/2021/10/Screenshot-2021-10-26-at-1.11.00-AM-1024x579.png)
![](https://therealprogrammer.com/wp-content/uploads/2021/10/Screenshot-2021-10-26-at-1.13.41-AM-1024x511.png)