Ticker

6/recent/ticker-posts

Ad Code

Responsive Advertisement

How to Remove index.php from URLs in Joomla 4

Introduction

In the previous article, we were talking about SEF URLs and how they would be used to optimize for human-readable and SEO ranking. We’ve seen how effective they are at removing the clutter of characters and numbers so every component of an URL is neat and easy to memorize.

However, those that are considered SEO-friendly URLs still contain a default text of index.php (right after the domain name). This is a parameter automatically added to each URL but it’s not necessary. It doesn’t bring any impact to SEO and from a user perspective, it becomes even more redundant. Therefore, it is a need to get rid of that text to better the quality of URLs and thus make them more SEO-friendly. Your site visitors will also appreciate that, and so do search engines.

In this tutorial, I will show you how to remove index.php from URLs in Joomla 4.

How to Remove index.php from URLs in Joomla 4

In order to successfully remove index.php from URLs in Joomla 4, you need to do the following two steps:

  • Enable the Use URL Rewriting option
  • Rename htaccess.txt to .htaccess

Now, let’s dig in!

Enable “Use URL Rewriting”

As pointed out in the previous tutorial, Use URL Rewriting is one of the few more SEO settings to configure revealed upon enabling Search Engine Friendly (SEF) URLs.

So again, from the Home Dashboard, navigate to System > Global Configuration.

Joomla 4 - Remove index.php - System - Global Configuration

Here, make sure you’re on the very first tab, which is Site.

Joomla 4 - Remove index.php - System - Global Configuration - System tab

Scroll down and find this section: SEO.

Joomla 4 - Remove index.php - System - Global Configuration - SEO settings

Enable the Use URL Rewriting option.

Joomla 4 - Remove index.php - System - Global Configuration - Use URL Rewriting

Click Save & Close and move on to the next step, immediately!!! Otherwise, your URLs will result in 404 errors.

Joomla 4 - Remove index.php - System - Global Configuration - Saved

Rename “htaccess.txt” to “.htaccess”

Alright now, the procedure for renaming the file will vary depending on the web server you are using.

For those using Apache, the most popular server to run Joomla on, you can easily find the htaccess.txt file at the root of your Joomla installation. As the Apache server doesn’t understand the htaccess.txt file, you need to rename it to .htaccess to make the file understandable.

To achieve that, log in to your Joomla file system with an FTP application. I’m currently running localhost so I’ll go there directly on my local system.

Once you’re in, look for the htaccess.txt file.

Joomla 4 - Remove index.php - System - Global Configuration - htaccess.txt

Here it is! Rename htaccess.txt to .htaccess and that would do the job.

Joomla 4 - Remove index.php - System - Global Configuration - .htaccess

Now that you have both SEF URLs and Use URL Rewriting enabled/turned on for your Joomla 4 website. You will see it applied everywhere to optimize all your site URLs.

And as the result, that helps remove index.php from URLs in Joomla 4. You can go back and check your SEO-friendly URLs on the front-end.

Joomla 4 - Remove index.php - Review on Frontend

That’s it! You now know how to remove index.php from URLs in Joomla 4.

Conclusion

By enabling Search Engine Friendly (SEF) URLs and allowing Use URL Rewriting, you are significantly improving the SEO performance of your website. Not only does that help you rank higher in Search Engine Results Page (SERP), but it also positively impacts user experience. Although configuring URLs is only a small step to promoting your website through SEO, you should never take it lightly.

Hope this article was useful to you. Don’t hesitate to share your thoughts in the comments section if you have any questions.

The post How to Remove index.php from URLs in Joomla 4 appeared first on LTHEME.

Enregistrer un commentaire

0 Commentaires