Out of the box, Joomla! includes a number of options that can be configured to provide a basic search engine friendly site, and lays the groundwork for your on-going SEO efforts. In this chapter we look at the default options, what they mean, and how to optimize them. While the default SEO options in Joomla! provide you with basic features you need, such as Search Engine Friendly URLs, this is just the beginning of what you can — and should — do to optimize your site effectively.
The topics covered in this chapter include:
Let's start by getting a clear definition of what it means for a site to have Search Engine Friendly URLs.
Sites created with content management systems like Joomla! rely on interaction with the database for the display of content. Accordingly, the URLs often include query strings and other characters that are part of the interaction with the database. A simple HTML site doesn't have this issue; instead, its URLs are typically much simpler and lack the complexity seen in a CMS-powered website.
URLs containing query strings and other odd characters are hard for both humans and search engines to read. Ideal URLs are readable and tell us something about the content of the page. By default, the Joomla! system produces complex URLs containing additional characters that serve no useful purpose for the site visitor. Accordingly, your first step towards making Joomla! more search engine friendly is to get rid of the messy URLs and replace them with Search Engine Friendly (SEF) URLs. Let's look at two real examples drawn from the default Joomla! installation (with the sample content loaded) to contrast the differences.
The Joomla! system, with the Search Engine Friendly URLs feature disabled, produces a URL that looks something like the following:
http://www.yoursite.com/index.php?option=com_content&view=article&id=22&Itemid=437
That is not search engine friendly. Not only is it hard to read, but also the odd characters and query strings will actually cause problems with some search engines. Moreover, it is simply not human friendly; it is long, hard to remember, and even harder to type accurately.
If you enable Joomla!'s Search Engine Friendly URLs feature, that same page produces a URL that looks something like the following:
http://www.yoursite.com/index.php/getting-started
This URL is a search engine friendly, and human friendly, URL.
Joomla! provides two levels of support for the creation of Search Engine Friendly URLs. The most basic level, as seen in the examples above, is enabled by default. A second, more advanced option is custom URL rewriting, which allows you to create URLs that do not include the string index.php
. Whether the URL rewriting feature is available to you will depend upon the web server being used on your web host.
During installation, Joomla! will automatically enable the SEF URLs option. If the feature has been disabled on your site, you can enable it by following these steps:
With the Search Engine Friendly URLs option enabled, you will have basic SEF URLs for your site. However, if possible, you will want to do more. URL rewriting will allow you to create superior URLs, without the index.php
string included in all the URLs.
In other words, instead of getting the following URL:
http://www.yoursite.com/index.php/getting-started
When the URL rewriting feature is enabled, you will get the following URL:
http://www.yoursite.com/getting-started
To enable URL rewriting, you will need to take additional steps. The exact steps depend on whether your web server is Apache or IIS. For Apache, follow the steps below (IIS instructions appear later):
htaccess.txt
. Create a duplicate of it and rename the new file to .htaccess
.If your site is using Microsoft's IIS Web server, instead of the Apache Web server, the process is different. Before you get started, you must make sure that the IIS URL Rewrite Module is installed on the server and is activated. Once you have verified that the module is installed and enabled, follow these steps for IIS Version 7:
web.config.txt
. Create a duplicate of it and rename the new file to web.config
.The Joomla! SEF URLs functionality is enabled by a Joomla! plugin named System - SEF. This plugin must be enabled for SEF URLs to work. Although it is enabled by default, if you are having problems getting the Search Engine Friendly URLs functionality to work on your site, visit the Plugin Manager (located under the Extensions menu) and assure the plugin is enabled in your system.
13.58.121.131