News Feed E-mail

Get How-To's right in your inbox. Subscribe to the HowToJoomla! news feed e-mail. Just enter your email address here:

Delivered by FeedBurner

Login






Lost Password?
No account yet? Register

Affiliates

Azrul's JomComment
JoomlaShack
iJoomla
The Joomla! Store
Member of W3C Sites dot com
How to turn on SEF URL's PDF Print E-mail
Written by Cory   
Monday, 18 December 2006

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 (29)add comment
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
1

report abuse
vote down
vote up
December 22, 2006
Votes: +0
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
2

report abuse
vote down
vote up
December 22, 2006
Votes: +0
Glenn: ...
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
3

report abuse
vote down
vote up
January 03, 2007
Votes: +0
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
4

report abuse
vote down
vote up
January 03, 2007
Votes: +0
Matthew Nuzum: ... http://www.bearfruit.org/blog
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)
5

report abuse
vote down
vote up
January 10, 2007
Votes: +0
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!
6

report abuse
vote down
vote up
January 10, 2007
Votes: +0
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
7

report abuse
vote down
vote up
January 10, 2007
Votes: +0
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
8

report abuse
vote down
vote up
January 10, 2007
Votes: +0
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
9

report abuse
vote down
vote up
March 11, 2007
Votes: +0
Steve,

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

Cory
10

report abuse
vote down
vote up
March 11, 2007
Votes: +0
FeeCOMSPU Boonsit: ... http://www.wallpaper-gu.com
thank for it but how to make url same the title.

Thank you
11

report abuse
vote down
vote up
March 23, 2007
Votes: +0
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
12

report abuse
vote down
vote up
March 23, 2007
Votes: +0
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
13

report abuse
vote down
vote up
April 16, 2007
Votes: +0
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
14

report abuse
vote down
vote up
April 16, 2007
Votes: +0
Yeah, I have finally figured it out! It was a realllllll ... pain, but it works now. thanks for checking!
Maria
15

report abuse
vote down
vote up
April 30, 2007
Votes: +0
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
16

report abuse
vote down
vote up
May 11, 2007
Votes: +0
hi,
Thanks for this cool web, about SEF i'm using SEF advance , it's realy good .
17

report abuse
vote down
vote up
May 21, 2007
Votes: +0
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.
18

report abuse
vote down
vote up
June 24, 2007
Votes: +0
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.
19

report abuse
vote down
vote up
August 31, 2007
Votes: +0
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
20

report abuse
vote down
vote up
September 11, 2007
Votes: +0
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.
21

report abuse
vote down
vote up
September 11, 2007
Votes: +0
Thanks for the article. I'm using for joomla for a new project and didn't know where this option was.
22

report abuse
vote down
vote up
October 15, 2007
Votes: +0
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.
23

report abuse
vote down
vote up
November 17, 2007
Votes: +0
Amitabh Choudhury: ... http://www.retailmalee.com
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.
24

report abuse
vote down
vote up
November 19, 2007
Votes: +0
jpastor: ...
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

25

report abuse
vote down
vote up
December 02, 2007
Votes: +0
Dave Lindberg: ...
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.
26

report abuse
vote down
vote up
June 02, 2008
Votes: +0
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?
27

report abuse
vote down
vote up
June 13, 2008
Votes: +0
Hi John...it could be a problem with your server. If you are not running Apache, SEF URL's might not work
28

report abuse
vote down
vote up
June 13, 2008
Votes: +0
Apache ver. 2.2.8 (Unix)
29

report abuse
vote down
vote up
June 13, 2008
Votes: +0

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

busy
 
Tag it:
Delicious
Digg
Technorati
< Prev   Next >
mosListMessenger

About HowToJoomla

HowToJoomla was started in September 2006 by me, Cory Webb, a long-time Mambo/Joomla user with a desire to give back to the community that has given so much to him.

HowToJoomla is not the best, most comprehensive Joomla tips site out there. That's not the goal. The goal is to share some of the knowledge and experience that I have gained through years of using the world's best content managment system. I hope that you will find this site useful and visit often. As I come across new tips and ideas, I will post them here for all to see.

I hope you enjoy using HowToJoomla and find it very useful.

Please take some time to read the Disclaimer.

Thanks for visiting!

About Me

I am a 28-year-old husband and father of a beautiful baby girl named Lucy. I have a degree in Electrical Engineering from the University of Texas at Austin, an MBA from Baylor University, and over 4 years experience working with the Mambo/Joomla CMS.

On February 1, 2008, I started a web design, development, and consulting company specializing in designing and developing custom Joomla-powered websites. The new company is aptly named Cory Webb Media, LLC. The double meaning is purely unintentional, but with a last name like "Webb" it is difficult to escape the obvious puns. If you are looking for professional assistance with your website, please feel free to contact me to discuss your project.

I also run HowToJoomla, CoryWebb.com (my personal website/blog), and JoomlaForm.com (a site dedicated to promoting good design in the Joomla! community). In my spare time (if there is such a thing), I volunteer with the youth ministry at my church.

Copyright © 2006 - Cory Webb Media, LLC - All rights reserved.
Powered by Joomla!