How to turn on SEF URL's

Written by Cory | December 18, 2006 | Add Comment (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&ampitemid=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)Add Comment

0
...
written by Dan Shaw, December 22, 2006
Is there something that needs to be done, like resetting the server to implement this. This website is on a GoDaddy server. I bought the domain from them as well. I understand that they don't run pure php. For security reasons they run php as a CGI and not as a module.
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
62
...
written by Cory, December 22, 2006
Hi Dan,

I'm not sure whether or not the php has anything to do with it. Perhaps GoDaddy does not have mod_rewrite enabled on their shared hosting accounts. That might be something you could ask them.

Cory
0
...
written by Glenn, January 03, 2007
Heya,
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
62
...
written by Cory, January 03, 2007
Hi Glenn,

The only thing I can tell you is to make sure that mod_rewrite is turned on. You might want to check your php.ini file.

Cory
0
...
written by Matthew Nuzum, January 10, 2007
Those aren't search engine friendly... SEF urls would have key words in them. For example, if you have a section called "blog" and a category called "howto" and you write a howto called creating templates, your URL would be something like:
/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)
62
...
written by Cory, January 10, 2007
Hi Matthew,

You'll get no argument from me on that. That's just the name that Joomla! uses for these types of URL's.

In reality, these are more people-friendly URL's. It's easier for a person to remember "/content/view/43/2/" than "index.php?option=com_content&id=43&Itemid=2". But you're right. There is probably no SEO benefit to using these types of URL's. That's why it is a good idea to get a product like OpenSEF, which will do exactly what you are describing.

Thanks for your input!
0
...
written by Ian Wright, January 11, 2007
Hi, before I start, I only found your site 2hrs ago, and haven't stopped reading it yet.
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
62
...
written by Cory, January 11, 2007
Hi Ian,

I'm glad you like the site! I hope you are finding it useful.

For Windows servers, check out this post from the Joomla! forums: "Using SEF without mod_rewrite". I have never tried it, so I do not know if it works or not.

I've heard SEF Advance at Sakic.net is a very good product if you want to spend money on an SEF product. If you are looking for a free one, check out OpenSEF and Artio JoomSEF. There are links to them above.

Have a nice day!
Cory
0
...
written by Steve, March 11, 2007
I use ARTIO JoomSEF. Love it! simple to use. One small problem I have is that I am getting multiple links with -2, -3, etc appended to the end of the SEF links for some pages. Not quite sure how to fix it.

Just managed to stumble across your website. Very nice indeed!

Cheers,

Steve
62
...
written by Cory, March 11, 2007
Steve,

Thanks for the tip on ARTIO JoomSEF. I've never used that particular product, but I've heard good things about it.

Cory
0
...
written by FeeCOMSPU Boonsit, March 23, 2007
thank for it but how to make url same the title.

Thank you
62
...
written by Cory, March 23, 2007
You would need to use a 3rd party SEF extension to do that. I have listed some of the more popular ones in the article.

Cory
0
...
written by Maria, April 17, 2007
Hi there, I am also struggling with the same issue... I have followed the steps on your and other websites. I am running Apache server, but I don't see mod_rewrite anywhere under System/ system info/ php info... I called my provider (godaddy.com) and they said that mod_rewrite is enabled automatically on the site. I have renamed the .htaccess file, but still nothing. Why do you think mod_rewrite doesn't show up under php info? Thank you smilies/smiley.gif
62
...
written by Cory, April 17, 2007
Hi Maria,

I just visited your site (www.salsainutah.com), and it looks like you have SEF URL's turned on. It looks like everything is working properly.

Cory
0
...
written by Hi Cory, April 30, 2007
Yeah, I have finally figured it out! It was a realllllll ... pain, but it works now. thanks for checking!
Maria
0
...
written by Rod, May 12, 2007
Maria? I think, what did you do to figure it out? I am using godaddy hosting and need mod_rewrite to work. Any help to a solution would be nice
0
...
written by ased, May 22, 2007
hi,
Thanks for this cool web, about SEF i'm using SEF advance , it's realy good .
0
...
written by gmack, June 24, 2007
anyone having problems with artio and ssl? All ssl urls get redirected back to my homepage. I've followed the directions very carefully and all works just fine until ssl enters the picture.
0
...
written by Henk, August 31, 2007
I note comments regarding the recommendation for Artio JoomSEF - I would suggest caution if you are planning to use this extension, versions later than V1.5 have advertising which may affect you sites.

Try using the JoomSEF version available from http://www.kangainternet.com/ which does the same job.
0
...
written by adrian, September 11, 2007
Hi,
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
62
...
written by Cory, September 11, 2007
Adrian,

It looks like your server might not support SEF URL's. Try going into the administrator and disabling SEF URL's in the configuration.
0
...
written by jc, October 15, 2007
Thanks for the article. I'm using for joomla for a new project and didn't know where this option was.
0
...
written by Grant, November 17, 2007
I too had the 404 error syndrome. Certainly a pain to solve in my case as most forums never listed the cure. They suggested certain areas which I broke down.

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.
0
...
written by Amitabh Choudhury, November 19, 2007
Hello Cory

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.
0
...
written by jpastor, December 02, 2007
Hi I also have godaddy using joomla and I get the 404 error when changing the htaccess to .htaccess

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

0
...
written by Dave Lindberg, June 03, 2008
I know this is an old thread but I have the same issue with GoDaddy.com . Once I made the change to SEF none of the links seemed to work.

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.
0
...
written by john, June 13, 2008
followed instructions to the letter. renamed the .htaccess and enabled the switch in global config. After this all the links on the site get redirected to a page not found site. Basicly changes all athe links to SEF but also disables all completely.

Can you help?
62
...
written by Cory, June 13, 2008
Hi John...it could be a problem with your server. If you are not running Apache, SEF URL's might not work
0
...
written by john, June 13, 2008
Apache ver. 2.2.8 (Unix)
0
...
written by Ben, August 11, 2008
I had the same problem enabling in goDaddy, even when I renamed the htaccess.txt file the SEF urls caused 404 errors. I actually gave up for a day and upon my return the next day I read up and found that GoDaddy does use Apache if you are on Linux hosting and also the mod_rewrite is already enabled.

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.
0
...
written by Alejandro Orduz, August 21, 2008
i ve been looking for this like crazy,,, thanks cory...

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!!!
0
...
written by Brad, September 09, 2008
Im setting up a Joomla! based website and want to activate the SEF URLs however Ive noticed that Im on an IIS server and it wont work apparently?
0
...
written by Alejandro, October 16, 2008
I had the same problem enabling in goDaddy, even when I renamed the htaccess.txt file the SEF urls caused 404 errors. I actually gave up for a day and upon my return the next day I read up and found that GoDaddy does use Apache if you are on Linux hosting and also the mod_rewrite is already enabled.

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
0
...
written by Casininio Casino Online, February 01, 2009
click to play javwz casino online or casino online

Write comment

security code
Write the displayed characters


busy

Join the HowToJoomla Community!

  • Create a profile
  • Connect with other members
    of the community
  • All for FREE

Sign up now!

 

Already a member? Login here.

HowToJoomla is proudly hosted by Eleven2

 
 
 

Search the Joomla! Community for Resources

 
 

Latest Community Activity

Yesterday
Cory and depika are now friends 12:47 PM
2 days ago
shashidhar replied in a discussion Need help 07:11 AM
shashidhar joined a group HowToJoomla! 07:10 AM
5 days ago
Shine Rankin replied in a discussion Need help 05:00 AM
Shine Rankin joined a group HowToJoomla! 04:59 AM
3 weeks ago
michael cuanico added Feeds application Jun 14
John joined a group HowToJoomla! Jun 10
 

Welcome to Our Newest Community Members

wil san
Ty Moyer
namal
krishan
shashidhar
leland
Jack Barakitis
Jim Livingstone
Robert Teufel
Amirul Azizi
James Hafner
Mahmood Anwar
 
 

Latest Comments

How to embed a Googl

I have embedded many times google maps to joomla, ...

Beginning Joomla! We

Thank you for given this great post.... ...

How to embed a YouTu

Hello, I have installed this plug in its working g ...

Blank Joomla! 1.5 Te

can rebrand to control panel logo? ...

How to Move Your Joo

Thank you for this. It worked like a dream for me ...