I don’t think you need an introduction to what a URL is. But still, I’m going to tell you anyway. The URL is the address of your website by which the search engines and the visitors find your website. So, it is important to make your website’s URL friendly for search engines and users so that they can find it easily.
The challenge with Joomla is, it doesn’t provide a user-friendly URL by default. So we need to work on that and that’s what we’ll be learning today in this tutorial. Our primary URL for this article is yoursite.com/index.php/about and our goal is to make it yoursite.com/about so that it will be easy to remember by humans and easily findable by search engines.
So let's get started.
Our goal is to drop the index.php
part which will make the URL more visible to the eye, easier to remember and to share.
Step by step guide to a user-friendly Joomla URL
Step 1
We need to log into the Joomla admin area of our site then go to System > Global Configuration.
Step 2
You’ll find SEO Settings on the right side of your screen. There, you’ll see “Search Engine Friendly URLs” is already been set to “Yes”. In case it’s set to “No”, you’ll need to change it to “Yes”. Otherwise, the functions we are looking for won’t be visible.
Step 3
This is the most complicated step and the most important one. What we are going to do in this step is, we will rename a file. In order to do that you need to log into your Joomla file system. The file name is htaccess.txt
which will be found in the main directory [Web Root (public_html/www
)] along with configuration.php
, index.php
and other files.
We will change htaccess.txt
to .htaccess
Note: You need to have Apache mod_rewrite enabled. If you can’t rename the htaccess.txt
file to .htaccess
then you’ll probably have it there. You can find it by enabling hidden files view. After that, open .htaccess
file and uncomment RewriteBase /
(just remove the #).
And, if after renaming htaccess.txt
to .htaccess
you see a "500 Internal Server Error" then open .htaccess
file and comment lines Options +FollowSymlinks
and Options -Indexes
(add # at the beginning of the lines). Then reload your site in your browser. If this step does not resolve the issue, please contact your hosting support.
Step 4
Now let's go back to our Joomla admin area and find SEO Settings (System > Global Configuration). We’ll set the “Use URL Rewriting” to “Yes”. Our work is done here.
Optional
If you want to show .html
after your URL you can enable “Add Suffix to URL” option. But to me, it's not necessary. The search engines do not care about .html
extension. So you can leave it as it is.
Our reward
Now that we’ve worked really hard to make our website’s URL user-friendly. Let’s see if our work has paid off!
Yay, it has!
Caution: This procedure is a difficult one and it may cause broken links to your site. The fix is simple if you see anything going south just change the settings to the default and you’ll see your site is up and running smoothly.
One more thing you might want to recheck before going live with this method, you may have used /index.php/
in your internal links, I'd suggest you drop that. Joomla still can read both URLs (with and without /index.php/
) but for search engines, those are two different pages with the same content. Sometimes this might impact search engine rankings because when duplicate content is present, Joomla site owners can suffer rankings and traffic losses.
Please note, for the purpose of this article we chose Apache webserver. If you’re running your website on other servers like Nginx, Hiawatha or Windows IIS please have a look at the official Joomla documentation.
Next Step: Making Joomla site SEO friendly by removing ID from URLs.
I've follow this instructions. The index.php was indeed removed but a [b]404 - Category not found[/b] shows. How can I fix this?
Thanks!
[list=1]
Enable Search Engine Friendly URLs
[/list]
[list=2]
Install a Good Sitemap and Submit to Webmaster Tools
[/list]
[list=3]
Improve your Page Titles and Meta Descriptions
[/list]
[list=4]
Use Good Alt Tags for Images, Optimize your Robots.txt File
[/list]
[list=5]
Use Joomla SEO Plugin Extensions
[/list]
When you use articles as blog items its better to unnumber the used articles. You can unnumber them by going to article settings and select tab-intergrations and select hide id’s
You can also create a hidden menu. So you can connect a article category to an hidden menu item.
Tis is used to make a more friendly link like /blog/animals/my-sweet-cat
I guess I know what you are referring to. I have explained it in another article. [url="https://www.joomshaper.com/blog/making-joomla-site-seo-friendly-by-removing-id-from-urls"]Have a look[/url]
I wish I could read it a few years ago - it would have saved a lot of time! Now I've learnt it the hard way (including the Error 500 thing!).
Catalin
Many thanks for this fantastic post.
Let me know if it worked.