Actions

Portal

Difference between revisions of "Search Engine Optimisation"

From Joomla! Documentation

Line 18: Line 18:
  
  
Posted by ''juanparati''
 
  
Add a static text in the <title>
+
== Add a static text in the <nowiki><title></nowiki> ==
  
 
Open the file:
 
Open the file:
Line 38: Line 37:
  
 
Other important thing, is don't use symbols like <nowiki>":", "-", "$",</nowiki> etc for the title.
 
Other important thing, is don't use symbols like <nowiki>":", "-", "$",</nowiki> etc for the title.
 +
 +
 +
Posted by ''juanparati''
 +
 +
 +
 +
== Add heading tags in the titles for more relevance ==
 +
 +
 +
Search engines give a special relevance to the senteces between a "H" tag like <nowiki><h1></nowiki>, <nowiki><h2></nowiki> or <nowiki><h3></nowiki>.
 +
 +
I you want put a "H" tag to joomla 1.5 you need edit some files:
 +
 +
Open components/com_content/views/category/tmpl/blog.php
 +
 +
seach for this piece of code (Line 5):
 +
 +
<nowiki>
 +
<div class="componentheading<?php echo $this->params->get('pageclass_sfx');?>">
 +
  <?php echo $this->escape($this->params->get('page_title')); ?>
 +
</div>
 +
</nowiki>
 +
 +
 +
add your "H" tags between the title like this:
 +
 +
 +
<nowiki>   
 +
<div class="componentheading<?php echo $this->params->get('pageclass_sfx');?>">
 +
  <h1><?php echo $this->escape($this->params->get('page_title')); ?></h1>
 +
</div>
 +
</nowiki>
 +
 +
 +
If you add more "H" tags between the joomla titles search into the tmpl directories for the code:
 +
 +
<nowiki>    get('page_title')</nowiki>
 +
 +
 +
And add the "H" tags.
 +
 +
Remember normalize the font-size of the "H" tags using css, for example
 +
 +
Edit your template css and add something like:
 +
 +
 +
<nowiki>    .componentheading h1 {
 +
      font-size: 16px;
 +
    }</nowiki>
 +
 +
 +
Posted by ''juanparati''

Revision as of 03:48, 20 June 2008

SEO refers to Search Engine Optimisation. SEO is the process of improving the volume and quality of traffic to a web site from search engines. SEO can also be referred to as SEF, or Search Engine Friendly.

See also:


Joomla specific SEO / SEF tricks:


Posted by dextercowley in regards to correcting a problem when enableing Search Engine Friendly URLs in the Global Configuration of Joomla 1.5.2 and tested and verified to be true for 1.5.3 as well.

" ... edit configuration.php as var $live_site = 'http://www.mysite.com' "

Note that default configuration.php is var $live_site = ''


Add a static text in the <title>

Open the file: libraries/joomla/document/html/renderer/head.php

Search for the next piece of code:

$strHtml .= $tab.'<title>'.htmlspecialchars($document->getTitle()).'</title>'.$lnEnd;

Add your statict text for example:

$strHtml .= $tab.'<title> All about Canada - '.htmlspecialchars($document->getTitle()).'</title>'.$lnEnd;

The text into the <title> tag is very important for the search engines.

If you need obtain a great search results for the word "All about Canada" I recommend your put the static text before of the $document->getTitle();

Other important thing, is don't use symbols like ":", "-", "$", etc for the title.


Posted by juanparati


Add heading tags in the titles for more relevance

Search engines give a special relevance to the senteces between a "H" tag like <h1>, <h2> or <h3>.

I you want put a "H" tag to joomla 1.5 you need edit some files:

Open components/com_content/views/category/tmpl/blog.php

seach for this piece of code (Line 5):

<div class="componentheading<?php echo $this->params->get('pageclass_sfx');?>"> <?php echo $this->escape($this->params->get('page_title')); ?> </div>


add your "H" tags between the title like this:


<div class="componentheading<?php echo $this->params->get('pageclass_sfx');?>"> <h1><?php echo $this->escape($this->params->get('page_title')); ?></h1> </div>


If you add more "H" tags between the joomla titles search into the tmpl directories for the code:

get('page_title')


And add the "H" tags.

Remember normalize the font-size of the "H" tags using css, for example

Edit your template css and add something like:


.componentheading h1 { font-size: 16px; }


Posted by juanparati