Apr 01 2007
Joomla URL Week Part 1 - Default Joomla URLs Print
Sunday, 01 April 2007

Joomla URL WeekWorking in Joomla SEO and browsing the forums, there is one question I hear more frequently than any other:


"What is the best URL setup for Joomla and why?"


Reading around, I haven't been able to find a clear answer currently available. So to resolve this question, this will be "Joomla URL Week" here at Alledia.


Each day we're going to break down one of the five most common URL setups with Joomla:



Today, we take you through the default Joomla URLs and help you to understand why they are the way they are.

What Do the URLs Look Like?

  • index.php?option=com_content&task=view&id=5&Itemid=6
  • index.php?option=com_search&Itemid=5
  • index.php?option=com_newsfeeds&Itemid=7

How Do I Set Up This Option?

Just install Joomla. These URLs are produced automatically.

Files Used in the Joomla URL

The first part of all default Joomla URLs is the file through which the page is loaded:

/index.php

All regular requests for Joomla frontend pages go through here and will appear in the URL.


/index2.php

Using this in the URL removes the template from the page so it is utilized for pop-ups such as the PDF and email pages.

Variables Used in the Joomla URL

The second, longer part of URL is not related to a file, but instead mainly uses information stored in the database. It uses "variables" (because they change depending on the situation) to create each page that the user wants:

$option

  • This is the name of the component currently being loaded by Joomla.
  • Examples are option=com_content, option=com_search, option=com_contact
  • These are stored in the #_components table in the "links" field.

$task

  • This is used to decide how a component should operate.
  • Examples with the Content component include:
    • task=view which is used to produce regular content items and print pages. There is no difference between the URLs for static content and regular content pages.
    • task=email which produces the Email pop up.
    • task=section which produces a table
    • task=blogsection which shows the articles in a section in blog format
    • task=blogcategory which shows the articles in a category in blog format

$id

  • This variable is only used by Content component and it is how Joomla knows which content item to show. Change the number and you change the page being displayed.
  • Examples are simple: id=1, id=2, id=3 and so on.
  • Content items are identified by their id in the #_content table.

$Itemid

  • The Itemid is used to decide which templates and modules are going to appear on each page. The Itemid is added to the URL by the menu link that you use to reach that page. So if the menu link has an Itemid of 7, that will be the Itemid of all pages until you click another menu link.
  • The Itemid is a pain in the butt! It isn't necessary to make a Joomla page work and it often doesn't work with many 3rd-party plugins.
  • An example is Itemid=6.
  • Itemids come from the id column in the #_menu table.
  • Read more about Joomla Itemids here.

This is not a complete list of variables that might appear in the URL, but they are the most common. Almost every component adds its own tasks for what it needs to do.

Advantages

  • Its easy.

Disadvantages

  • The URLs are meaningless to a visitor and hard to remember. They are also useless to search engine who can't extract any meaningful information from them.
  • URLs that include a ? are less trusted by Google. This is because pages with a ? can be used to deliver different pages to different customers. For example, a site might deliver a keyword-rich spam page to search engines but an ordinary page to visitors. Google prefers pages with static URLs and relatively unchanging content.
  • Because the Itemids are not hidden, it is possible to have an infinite number of URLs pointing to the same content. This is a nightmare when it comes to Duplicate Content. All of these URLs would be valid:
    • index.php?option=com_content&task=view&id=5&Itemid=1
    • index.php?option=com_content&task=view&id=5&Itemid=2
    • index.php?option=com_content&task=view&id=5&Itemid=3
    • index.php?option=com_content&task=view&id=5&Itemid=4
    • index.php?option=com_content&task=view&id=5&Itemid=5 etc.

When Should You Use This Option?

Never. Its as simple as that.


In addition to the search engine ranking disadvantages outlined above, consider your poor users. The default Joomla URLs we've talked about are confusing, difficult to remember and difficult to type.


Even when you don't have mod_rewrite on your server and can't get it installed, there is a great hack posted on the Joomla forums that enables you to create SEF URLs. I have yet to see a server set-up where its either particularly difficult or even impossible to create better URLs than this.


Keep reading, because over the next few days we'll discuss better alternatives that can increase your site's popularity with visitors and search engines.


Comments (8)Add Comment
...
written by Brian Teeman, March 30, 2007
I always find it easier to think of itemid as menuid
...
written by steve, March 30, 2007
Hey - great tip Brian.

I think there was even a serious suggestion on the Joomla forums to change Itemid to Menuid because its such a better name to descibe what it does.
...
written by Brian Teeman, March 31, 2007
i think it wasme that made the sugestion smilies/wink.gif

Really looking forward to reading the rest of the weeks articles.
Yay
written by Justin Whittaker, April 02, 2007
Hi Steve. Thanks for writing these articles from my question!
...
written by steve, April 02, 2007
Hey Justin - no problem at all.

Its the kind of thing that I hope a lot of people find useful and it also answers a question I get from clients a lot, so it should save me some time in the future, too. smilies/smiley.gif
...
written by Raf, June 22, 2007
Excellent help I must say, really appreciate it all smilies/smiley.gif
...
written by Whiskey, January 02, 2008
Thanks for the useful information. I am about to but a hosting package for my Joomla! powered site and there is great information to know before choosing the right hosting company for SEFs!
Wha???
written by A.Y., January 16, 2008
Thanks for the concise, precise article.

What if you want to load up an article (in a litbox, for example) with no template or mambots? Essentially, just pure text. Joomla doesn't seem to allow for that...

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
 
Joomla SEO Club and Book Logo
Search
Login
Blog Details

Subscribe by RSS

Creative Commons License All blog articles are licensed under a Creative Commons Attribution 3.0 United States License.
Top Comment Posters
Good Web Practices
(114 comments)
Klaus Nitsche
(78 comments)
Brian Teeman
(68 comments)
Hummerbie
(35 comments)
guido
(34 comments)
Ansiklopedi
(30 comments)
Amy Stephen
(29 comments)
Yannick Gaultier
(28 comments)
Cory
(27 comments)
Anthony Olsen
(18 comments)
Blog Categories
Accessibility
Affiliates
Alledia News
Analytics
Book Reviews
Business
Design
Domain Names
Domain Tips & Tricks
Drupal
E-Commerce
Extensions of the Month
General CMS Issues
Interviews
Joomla Affiliates
Joomla 1.5
Joomla Blogs
Joomla Hacks
Joomla Hosting
Joomla News
Joomla People
Joomla SEO eBook
Joomla SEO Rankings
Joomla Sites
Joomla South East
Joomla Templates
Joomla Tips & Tricks
Joomla URLs
Open Questions
PHP
Pay Per Click
Product Reviews
Rants
Scams
Recommended Sites
Search Engine Optimization
Security
SEO
SEO Club
SEO Competition
Site Reviews
Template Clubs
Yellow Pages
Virtuemart
Vlogs
Wordpress
Translate
right