Search Engine Optimisation
From Joomla! Documentation
This portal page is actively undergoing a major edit for a short while.
As a courtesy, please do not edit this page while this message is displayed. The user who added this notice will be listed in the page history. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.
If this page has not been edited for several hours, please remove this template, or replace it with {{underconstruction}} or {{incomplete}}.
Getting started with SEO
|
Troubleshooting SEO problems
|
Advanced SEO
|
About Search Engine Optimisation
Search Engine Optimisation (often abbreviated to SEO) refers to the process of improving the volume and quality of traffic to a Website from search engines. A site that has been optimised according to SEO practices is said to be Search Engine Friendly (often abbreviated to SEF).
A somewhat important SEO technique that also helps your users is using Search Engine Friendly URLs. See Enabling Search Engine Friendly (SEF) URLs for more information.
See also: Beginners: Address Search Engine Optimisation
Dynamic MetaDesc in a list of articles by category
When you view a list of articles by category, joomla put into the page the default configuration metadescription, but perhaps we want write the category description into the metatag for SEO reasons.
For this we need open the file includes/application.php.
Search for this piece of code in the function &getParams:
$params->def( 'page_title' , $title );
$params->def( 'page_description', $description );
Add this code before:
if (strcasecmp($_GET['view'],'category')==0) {
$description = $database->GetOne("SELECT description FROM #__categories WHERE id={$_GET['id']}");
}
Now the metadescription is more dynamic when you view a list of articles by category.
Change default SEF suffix from .html to .htm
If you need to change default article SEF suffix from .html to .htm (for example, if you need to move static site to Joomla and keep existing urls with .htm extensions), you need apply following patch to includes/router.php (working on Joomla 1.5.9, should work on other 1.5.x versions):
Index: includes/router.php =================================================================== --- includes/router.php (revision 13023) +++ includes/router.php (working copy) @@ -57,8 +57,13 @@ { if($suffix = pathinfo($path, PATHINFO_EXTENSION)) { - $path = str_replace('.'.$suffix, '', $path); - $vars['format'] = $suffix; + if ($suffix == 'htm') { + $path = str_replace('.'.$suffix, '', $path); + $vars['format'] = 'html'; + } else { + $path = str_replace('.'.$suffix, '', $path); + $vars['format'] = $suffix; + } } } } @@ -93,7 +98,8 @@ { if($format = $uri->getVar('format', 'html')) { - $route .= '.'.$format; + //$route .= '.'.$format; + $route .= '.htm'; $uri->delVar('format'); } }
Note: This patch only for bundled SEF plugin