How to turn on SEF URL's
December 18, 2006 | by CorySEF URL's are just a way to make your URL's look nice. The default SEF URL functionality in Joomla! takes URL's that look like this:
"index.php?option=com_content&task=view&id=40&itemid=29"
and makes them look like this:
"content/view/40/29/"
This article will show you how to turn on the basic SEF URL functionality built into Joomla!, and it will also provide a list of SEF URL extensions that you can use to gain further control over your URL's. For this article, I am assuming that you are running your website on an Apache web server.
Turning on SEF URL's in Joomla!
Step 1: mod_rewrite
If you are running your site on Apache, you need to make sure that mod_rewrite is enabled on your server. If you are in a shared hosting environment, or if you do not have root access to your server, ask your hosting provider if this is enabled. For more information on mod_rewrite, visit mod_rewrite page at the Apache website.
If you are running IIS, or if you wish to attempt enabling SEF URL's without mod_rewrite, there is a post in the forums that explains how to do it. The post is titled "Using SEF without mod_rewrite". Honestly, I've never looked into doing it that way before, so I will not be able to answer questions about this method. Fortunately, the thread in the forums is several pages long, so I am sure your questions will be answered there.
Step 2: The .htaccess file
The Joomla! distribution package comes with a file called "htaccess.txt" in the root folder of your installation. The first thing you need to do to enable SEF URL's is to rename that file to ".htaccess".
Step 3: Modify the Global Configuration
In your administrator panel, click on Site->Global Configuration.

Next, click the "SEO" tab.

Set "Search Engine Friendly URLs:" to "Yes", and click the "Save" button in the toolbar.

That's all there is to it. You now have SEF URL's enabled on your site.
SEF Extensions
The SEF URL's that are generated by Joomla! are not very descriptive of the content they are pointing to. Let's face it... "content/view/40/29/" doesn't give much of a hint about what content is on that page.
Fortunately, there are hooks in the Joomla! framework that allow for the development of extensions to make more descriptive SEF URL's. Even more fortunately, there are already several components available that extend Joomla!'s SEF URL functionality. There is a list in the extensions directory here. I will briefly mention the most popular ones.
- OpenSEF: OpenSEF is free, and it is a great option with a user friendly administrator interface.
- ARTIO JoomSEF: I've never used this one, but I've heard good things about it. It is also free.
- SEF Advance: This is the only commercial SEF extension that I know of. It is developed by one of the Joomla! core developers, and as far as I know it has been around longer than any other SEF extension. Cost: 40 € (Euro)
As always, if you have questions or comments, please post them below.
About the Author
In the years since Joomla! was founded, Cory has built dozens of websites with Joomla! and helped thousands of people find answers to questions about Joomla! through HowToJoomla.net. Cory has also written a book about Joomla titled Beginning Joomla! Web Site Development published by Wrox in April, 2009. In February of 2008, Cory founded Cory Webb Media, LLC, where he provides consulting and web development services for companies of all sizes. You can follow Cory on Twitter @corywebb, or become a fan of Cory Webb Media on Facebook. Cory is also the founder of Themeables, a template club for Joomla!, and developer of /motif, the framework that powers Themeables.
Related Articles
- Must-have Components
- Organizing Your Content
- How to change your WYSIWYG editor
- Installing Multiple Instances of Joomla! With 1 Database
- How to Move Your Joomla! Site to a New Server
- How to Change What Displays on the Home Page
- How to Use Multiple Menus on the Same Page
- How to Display Your Page Title in Your Template
- How to Lose the Splash Page
- How to Move your Joomla! Installation Between Directories
- How to display a component's output and nothing else
- How to use the syndicate (RSS) component in Joomla!
- Joomla! Jargon
- How to make your site more secure
- How to add a widget to a module
- Quick Tip: Use JoomlaXplorer to modify your template.
- Quick Tip: Buy this book
- Packt Publishing Release Book: Building Websites with Joomla! 1.5 Beta 1
- How to change your favicon






