JoomDev is Closing Its Joomla Products
  • About
    • Seldom things in life do turn out better than you hoped for. Our application development, website maintenance and hosting with JoomDev did. The driving force behind the firm is its unique way of balancing quality services with realistic budgets. The passion and enthusiasm shown by Chetan and his team from the very first moment we met them, we knew that our search was over.
      photo-alex
      Alex Shvarts
      Fundkite

      Our Clients

  • Blog
  • Contact

How to Remove Index.php from URL in Joomla 4

How to Remove Index.php from URL in Joomla 4

In this tutorial, we will be looking at removing index.php from the URL’s generated on the frontend for better SEO of your Joomla 4 site.

By default here is what a menu item URL looks like in Joomla.

http://localhost/joomla4_alpha4/index.php/movies

Explaining the URL a little:

http://localhost/joomla4_alpha is the root of a Joomla install if your website name is abc.com your root will be http://abc.com.

index.php/movies/ ==> movies is the alias of the menu item on the backend, index.php is something that’s added to every URL as this is how URL’s works by default in Joomla.

This Joomla tutorial will work for Joomla 3 as well.

Enable URL Rewriting

To enable URL rewriting login to your Joomla backend and go to System >> Global Configuration

How to Remove Index.php from URL in Joomla 4

In the very first tab (site), click the button Use URL rewriting

How to Remove Index.php from URL in Joomla 4

Now before you save the settings here, you have to rename a file or all your website URL’s will result in a 404 error.

Rename htaccess.txt file

Login to the FTP so you can browse files for your Joomla installation.

Once there, rename the file htaccess.txt to .htaccess.

Once done, you can go back to the Joomla screen and save the changes and your new SEF URL’s would look something like http://localhost/joomla4_alpha4/movies, which is much better for SEO.

Let me know if I missed anything in the comments down below?

Watch Video tutorial about How to remove index.php from URL

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Table of Contents

I’ve had the great pleasure of hiring JoomDev for several projects over 8 years. The team brought our ideas to life and created the customized application that we only imagined in our minds. We appreciate JoomDev “can do” attitude and co-operation to complete any task until being fully satisfied. Hire JoomDev, you’d be crazy not to!
photo-alex
Alex Shvarts
Fundkite

Contact Sales

Start a Project