How can we help you today?

How to Enable Clean URL's for Magento 1

Created by: Rens Zuurbier

Modified on: Fri, 29 May, 2020 at 8:31 AM

Clean URL's are less intimidating to visitors and have a positive effect on search index optimization (SEO) as well.
They "Clean up" the URL structure used when visiting a Magento webshop.

Rather then having URL's like:, after enabling the Search Engines Optimization setting, the URL will instead be rewritten to:

This setting does not require additional webserver configuration. To make use of clean URL's in Magento, all you need to do is adjust the Search Engines Optimization setting in the Magento backend. If you enable this setting, the URL's containing index.php will be rewritten to URL's without the index.php.


Enable Clean Urls

To enable the use of clean URL's, log in on your Magento admin backend and navigate to:

For Magento 1:

System -> Web -> Search Engines Optimization.

For Magento 2: 

Stores -> Configuration -> Web.

From there, enable Use Web Server Rewrites (Select "Yes"), and click Save Config to activate your changes.

As redirects are heavily cached in your local browser cache, sometimes it's necessary to flush the cache of your browser.

Remove index.php From Any URL

To remove the index.php from the URL, use the following snippet and add it to /data/web/nginx/public.rewrites:

rewrite ^/index.php/(.*) /$1 permanent;
Rens is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.