How to turn on SEF URL's
Written by Cory |
December 18, 2006
|
(0)
SEF 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.
Trackback(0)
Comments (34)
written by Glenn, January 03, 2007
I am hosting internally on localhost using Lamp ubuntu, I have followed these steps and some other sites steps religiosly but seem to be hitting a brick wall. No matter what i do I still ge the whole 404 error problem when clicking on a link. When I check under info, php - mod rewrite is there in the list of apache modules, the .htaccess file is correct and enabled but I still seem to be getting this 404 error pages. I am at my wits end and just cant seem to get it to work, could you please help me.
many thanks
Glenn
written by Matthew Nuzum, January 10, 2007
/blog/howto/creating_templates... that way, search engines would know the page is a howto about creating templates. Instead, you get something like /content/view/43/2/ which has absolutely 0 value to search engines.
(Just my $0.02 worth)
written by Ian Wright, January 11, 2007
Excellent work
http://www.sakic.net/products/sef_advance/documentation/
I found this a few weeks back when I was looking at SEO in Joomla, and even though I've never used it "yet" it looks quite excellent.
it replaces the numbers with the content page titles, allowing a much higher chance of SEO working in Google and other engines.
It was built by Emir Sakic, who I believe is a Joomla core programmer.
Only problem I have now, is that I use Windows servers, so I'm off to find some Linux hosting.
Regards
Ian
written by Steve, March 11, 2007
Just managed to stumble across your website. Very nice indeed!
Cheers,
Steve
written by FeeCOMSPU Boonsit, March 23, 2007
Thank you
written by Maria, April 17, 2007
written by Hi Cory, April 30, 2007
Maria
written by Rod, May 12, 2007
written by ased, May 22, 2007
Thanks for this cool web, about SEF i'm using SEF advance , it's realy good .
written by gmack, June 24, 2007
written by Henk, August 31, 2007
Try using the JoomSEF version available from http://www.kangainternet.com/ which does the same job.
written by adrian, September 11, 2007
I created a test site to explore 1.012 ecommerce edition . in the process messed up my other site I two am from the old basic days . I just learn to you ftp. my installation when well . but i get the 404 error. how do i rename the url into something usable. For some reasonh everything i dl gives my the same result . nothing. what can i do to make me ecommerce site function properly. is there anyone i can call and talk to live.
Thanks
adrian
written by jc, October 15, 2007
written by Grant, November 17, 2007
Some suggested to see if your php.ini file is correct but never found much relating to what i wanted to do in any of my php.ini files, so I eliminated those.
This left me server but there are a number of potential problems here such as the httpd.conf file and the .htaccess file. I played with the .htaccess file until I found it mentioned that ARTIO JoomSEF creates its own .htaccess if not available. It is then supposed to work but in my case it never did. I changed and changed here but no luck. The problem had to be deeper.
httpd.conf was the only part left. I found two things here. Firstly, I checked my mod_rewrite. All was good there. I then carried on down and found this "AllowOveride". It controls what directives may be placed in the .htaccess files. I changed "None" to "All".
My problem was solved.
written by Amitabh Choudhury, November 19, 2007
Your site has provided links to the info I required about SEF. Thanks. Have you looked into Artio yet(as on date). I am a freelancer researching on Joomla for my projects and developing offline for my site.
Thanks again for the info.
regards,
Amitabh.
written by jpastor, December 02, 2007
Im trying to post my htaccess file but it says my comment is to long, where can I send it to have it reviewed?
thanks
written by Dave Lindberg, June 03, 2008
I followed what the others said to do in this thread said to do and it worked.
Joomla 1.5 Steps on Godaddy.com using Linux box:
1. Global Configuration
2. SEO Settings
3. Search Engine Friendly URLs > Yes
4. FTP'd to my sites Joomla folder and changed "htaccess.txt" to ".htaccess"
5. Use Apache mod_rewrite > Yes
6. (Optional) Add suffix to URLs > Yes
7. Save
8. Wait 1-hour for the change to happen. Now all links workd and are search friendly.
written by john, June 13, 2008
Can you help?
written by Ben, August 11, 2008
So I tried re-enabling everything again in exactly the same way and it magically worked. The conclusion I came to is that GoDaddy must cache certain files, so you people with this problem fear not. Make the necessary changes and just wait 24 hours to see if it does kick in.
written by Alejandro Orduz, August 21, 2008
also not only in this blog but also in many, many others i have read and hear a lot of problems with goDaddy servers... well, you get what you paid for, goDaddy is one of the worst servers in the world, and people are just so stupid an continues buying this horrible servers!!!
written by Brad, September 09, 2008
written by Alejandro, October 16, 2008
So I tried re-enabling everything again in exactly the same way and it magically worked. The conclusion I came to is that GoDaddy must cache certain files, so you people with this problem fear not. Make the necessary changes and just wait 24 hours to see if it does kick in.30wow gold
written by Casininio Casino Online, February 01, 2009
Write comment
Join the HowToJoomla Community!
- Create a profile
- Connect with other members
of the community - All for FREE
Already a member? Login here.



My formal programming training ended back with IBM Basic, (yes, I am that old) though I have managed to pick up a bit of html skills, I have the foggiest of ideas as to what that means. What I do know is that as soon as I made the switch to Search Engine Friendly URLS after renaming htaccess.txt, the entire website ground to a halt.
Only the page that was up when I made the switch or the home page with a new browser window appears. As soon as any link is clicked you get a 404 error.
Needless to say, I switched everything back.
Thanks,
Dan