Home arrow Site Administration arrow Page 2 - Joomla Layouts: Customizing Your Website

Enabling Search Engine and User Friendly URLs in Joomla - Administration

This is part two of a series on Joomla web development in Ubuntu. In the first part, you learned the basic but very important website development skills in Joomla. In this part, you'll learn how to work with templates and other aspects of creating a customized Joomla-based website.

TABLE OF CONTENTS:
  1. Joomla Layouts: Customizing Your Website
  2. Enabling Search Engine and User Friendly URLs in Joomla
By: Codex-M
Rating: starstarstarstarstar / 3
August 31, 2010

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

The default URL structure of Joomla is not friendly. For example, if you try to visit one of the website's pages, the URL you will see will look something like this: http://localhost/joomla/index.php?option=com_content&view=article&id=5:joomla-license-guidelines&catid=25:the-project&Itemid=2

Search engines like Google recommend the use of keywords in the URL and making the URL as user friendly as possible. This is best done in the website development stage, when there are still no important pages published on the Internet. It is not recommended that you do this if you have a Joomla website with hundreds to thousands of pages in the Google index, because this will entail a lot of work, take time to stabilize, and will drastically affect your current website traffic.

Since this website is still in the development stage, this is the best time to rewrite the URLs. Take the following steps:

1. Log in as a Joomla administrator: http://localhost/joomla/administrator/

2. Go to Site ==> Global configuration and look under “SEO Settings.” You will notice that the following items are off (set to No):

  • Search Engine Friendly URLs
  • Use Apache mod_rewrite
  • Add suffix to URLs

3. You need to enable the Apache mod_rewrite module, so make sure that the .htaccess is there on the website's root directory. Go to Joomla's root directory in XAMPP htdocs. Look for htaccess.txt and change the file name to .htaccess.

Using your Linux terminal prompt, this is a sample path for Joomla htdocs root directory:

codex-m@codex-m-desktop:/opt/lampp/htdocs/joomla$ 

Then, to change the filename from htaccess.txt to .htaccess, execute the command:

mv htaccess.txt .htaccess

In a Linux prompt:

codex-m@codex-m-desktop:/opt/lampp/htdocs/joomla$ mv htaccess.txt .htaccess

4. Now that the file has been renamed, go back to Site ==> Global Configuration in the Joomla administrator panel. Under SEO Settings, check the following options:

  • Search Engine Friendly URLs (Yes)
  • Use Apache mod_rewrite (Yes)
  • Add Suffix to URLs (Yes)

5. Click “Apply,” and then “Save.”

6. In Firefox, go to Tools ==> Clear Recent History, and set the “Time range to clear” to “Everything.”  Click “Clear Now.”

7. Open a new tab and type this in the browser: http://localhost/joomla/ 

8. You will notice that if you try visiting pages, the URLs are now short and search engine friendly (with keywords in the URL).

For example, the URL for “Joomla! License Guidelines” is changed from:

http://localhost/joomla/index.php?option=com_content&view=article&id=5:joomla-license-guidelines&catid=25:the-project&Itemid=2

to: http://localhost/joomla/joomla-license.html

Basically the purpose of the above selected options are the following:

  • Search engine friendly URL - forces the title tag of the page or page alias to be included in the URL.
  • Apache mod rewrite – shortens and cleans the URL.
  • Add Suffix to URLs – adds a .html extension to the URL.

IMPORTANT NOTE: Since the website path in the Ubuntu XAMPP localhost is: http://localhost/joomla/ , and then you are uploading this Joomla website to your hosting server root directory so that the Joomla homepage will be accessible in the browser with this URL (example only) : http://www.thisisyourjoomlawebsiteinserver.com , you need to go to configuration.php and edit the $live_site setting. So change that line from:

var $live_site = '';

to:

var $live_site = 'http://www.thisisyourjoomlawebsiteinserver.com';

Change the Home Page Title Tag

The current home page title tag in a default Joomla installation is: Welcome to the Frontpage

However, you can edit the title tag to something relevant to your website topic, considering its importance in search engine optimization. For example, let's set the title tag to Codex-m Scuba Diving Training Agency.

To change the current home page title tag:

1. Log in as a Joomla administrator.

2. Go to Menus ==> Main Menu.

3. Click “Home” under “Menu Item.”

4. Expand “Parameters(System)” on the right.

5. Change the Page Title from “Welcome to the Front page” to Codex-m Scuba Diving Training Agency.

6. Click Apply, and then Save.

7. Log out of your website and clear your browser cache.

8. Visit the home page URL: http://localhost/joomla/

The title tag will now be changed to the correct one. See the screen shot below:




 
 
>>> More Site Administration Articles          >>> More By Codex-M
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

SITE ADMINISTRATION ARTICLES

- Coding: Not Just for Developers
- To Support or Not Support IE?
- Administration: Networking OSX and Win 7
- DotNetNuke Gets Social
- Integrating MailChimp with Joomla: Creating ...
- Integrating MailChimp with Joomla: List Mana...
- Integrating MailChimp with Joomla: Building ...
- Integrating MailChimp with Joomla
- More Top WordPress Plugins for Social Media
- Optimizing Security: SSH Public Key Authenti...
- Patches and Rejects in Software Configuratio...
- Configuring a CVS Server
- Managing Code and Teams for Cross-Platform S...
- Software Configuration Management
- Back Up a Joomla Site with Akeeba Backup

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: