Magento by default uses index.php for routing to urls. It is because some time you are on shared hosting and your apache is not configured with url rewrites = on or even on dedicated server you don’t have configured apache to work with url rewrites.

To remove “index.php” from magento urls you need to turn on the url rewrites.

Dedicated Hosting

It is simple in dedicated hosting
Edit httpd.conf (apache configuration file) and un-comment following line by removing “;” or “#” from beginning of line.
for example


#LoadModule rewrite_module modules/


LoadModule rewrite_module modules/

Save the file and restart apache.

Shared Hosting

In shared hosting that is normally on, but if that is off then you need to contact your hosting provider to turn it on.

Magento Configuration

After making sure url rewrites are on, go to Magento backend > configuration > General > web
Look for “Search Engines Optimization” section

Remove index.php from urls
Remove index.php from urls

Look for “Use Web Server Rewrites” and select “Yes” from dropdown, Save the config and refresh the front page of your website, you will see index.php is removed from urls.

Enjoy 🙂