Portal

Difference between revisions of "Search Engine Optimisation"

From Joomla! Documentation

m (Made miscellaneous improvements)
m (Removed live site variable link as covered in troubleshooting page)
(27 intermediate revisions by 6 users not shown)
Line 1: Line 1:
SEO refers to Search Engine Optimisation. SEO is 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 SEF, or Search Engine Friendly.
+
{| style="width:100%;" cellspacing="1"
 
+
| class="home-tile" style="width:33%;" |
See also:
+
<div class="home-tile-title" style="background-color:rgba(87,138,214,.3);">'''Getting started with SEO'''</div>
* [[Beginners#Address_Search_Engine_Optimization|Beginners: Address Search Engine Optimisation]]
+
<div class="home-icon">
* [[Making your site Search Engine Friendly]]
+
<div style="display:inline-block; padding:.7em .5em;">[[Image:Nuvola_arrow_right.png|30px]]</div>
* [[SEF URLs in Joomla! 1.5]]
+
</div>
* [[How do you implement Search Engine Friendly URLs (SEF)?]]
+
<div style="display:inherit; padding:.4em .5em; min-width:33%;">
 
+
;[[Making your site Search Engine Friendly|Making your site Search Engine Friendly]]
[[Category:Landing Pages]]
+
;[[Using_A_Sitemap|Using a Sitemap]]
[[Category:Search Engine Optimization]]
+
;[[Using_The_Title_Tag|Making the most of the title tag]]
'''Joomla specific SEO / SEF tricks:'''
+
;[[Using_The_Meta_Description|How to write good meta descriptions]]
== Fixing Broken Site When SEF is Enabled ==
+
;[[Using_Keywords|Planning and using keywords]]
Situation: Joomla template missing. Pages displayed with no templates.
+
</div>
 
+
| style="padding-right:1.2em;" |
To correct the problem when enabling Search Engine Friendly URLs in the Global Configuration, edit the configuration.php file variable $live_site.
+
| class="home-tile" style="width:33%;" |
 
+
<div class="home-tile-title" style="background-color:rgba(255,255,0,.3)">'''Troubleshooting SEO problems'''</div>
The default $live_site variable in configuration.php is
+
<div class="home-icon">
<source lang="php">var $live_site = '';</source>
+
<div style="display:inline-block; padding:.7em .5em;">[[Image:Star_icon.png|30px]]</div>
 
+
</div>
If Joomla is not in the root, then you need to include the folder path
+
<div style="display:inline-block; padding:.4em .5em; min-width:33%;">
<source lang="php">var $live_site = 'http://www.mysite.com/myjoomlafolder';</source>
+
;[[Common problems when enabling Search Engine Friendly (SEF) URLs|Common Problems]]
 
+
;[[Monitoring SEO]]
See also [[Why does your site get messed up when you turn on SEF (Search Engine Friendly URLs)?]]
 
== Add a static text in the <nowiki><title></nowiki> ==
 
{{:Customising the dynamic page title}}
 
 
 
== Add Heading Tags in the Titles for More Relevance ==
 
Search engines give a special relevance to the sentences 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:
 
 
 
Override components/com_content/views/category/tmpl/blog.php
 
 
 
search for this piece of code (Line 5):
 
<source lang="php">
 
<div class="componentheading<?php echo $this->params->get('pageclass_sfx');?>">
 
  <?php echo $this->escape($this->params->get('page_title')); ?>
 
 
</div>
 
</div>
</source>
+
| style="padding-right:1.2em;" |
 
+
| class="home-tile" style="width:33%; text-align:left;" |
add your "H" tags between the title like this:
+
<div class="home-tile-title" style="background-color:#d3e5b8;">'''Advanced SEO'''</div>
<source lang="php">
+
<div class="home-icon">
<div class="componentheading<?php echo $this->params->get('pageclass_sfx');?>">
+
<div style="display:inline-block; padding:.7em .5em;">[[Image:Advanced_icon.png|40px]]</div>
  <h1><?php echo $this->escape($this->params->get('page_title')); ?></h1>
 
 
</div>
 
</div>
</source>
+
<div style="display:inline-block; padding:.4em .5em; min-width:33%; max-width:66%;">
 +
;[[Microdata]]
 +
;[[Google Updates]]
 +
;[[Add_Static_Text_In_Title_Of_Page|Add static text in the title of pages]]
 +
;[[Using_RSS_Feeds_To_Share_Content|Using RSS feeds to encourage traffic]]
 +
|}
 +
<br />
 +
{{Template:Box-header-sq | title=About Search Engine Optimisation
 +
|noedit=yes <!--remove edit link from content boxes -->
 +
|border=sienna          <!-- This is the color of the borders around Box Sections -->
 +
|titleforeground=#000000    <!-- This is the color of the Box Section Title Bar text -->
 +
|titlebackground=wheat <!-- This is the color of the Box Section Title Bar -->
 +
|background=cornsilk    <!-- This is the color of the Box Section background -->
 +
|foreground=black      <!-- This is the color of the Box Section text -->
 +
|titlefont-size=1.0em
 +
}}
  
If you add more "H" tags between the joomla titles search into the tmpl directories for the code:
+
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).
  
<source lang="php">
+
{{dablink|The main article about SEO is [[Making your site Search Engine Friendly]], which lists steps that lead to a better search engine ranking.}}
get('page_title')
 
</source>
 
  
And add the "H" tags.
+
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.
 
+
</div>
Remember to normalize the font-size of the "H" tags using CSS. For example, edit your template css and add something like:
+
[[Category:Landing Pages]]
<source lang="css">
+
[[Category:Search Engine Optimisation]]
.componentheading h1 {
 
font-size: 16px;
 
}
 
</source>
 
 
 
To override the output of a component or module see: [[How to override the output from the Joomla! core]]
 
 
 
== Utilize RSS Feeds for Search Engines ==
 
Some search engines allow you to submit feeds to them for utilization in their search capabilities. Yahoo! Site Explorer [siteexplorer.search.yahoo.com] is one such service. This is a powerful way for sites that regularly update their content to get relevant search placement. It can also be used for simpler sites that have fairly static pages. This procedure will explain how to create feeds for pages within your site, be it static or not.
 
 
 
'''In Joomla! 1.5.3:'''
 
If you are not using sections and categories for your static pages, create a generic section for these static pages, such as <nowiki>"website content"</nowiki>.
 
Create separate categories for each static page.
 
Change your menu items from, for instance, Article Layout to Category Blog Layout.
 
Under the advanced parameters for the menu item, make sure that the show a feed link item is set to show.
 
Make sure the syndicate module is published. If it isn't go to the Extensions Menu, select Module Manager, select the new icon, select Syndicate and publish the module in the desired position. You can then view the site and copy the URLs for each feed to submit to each search engine.
 
 
 
'''NOTE: You should have SEF enabled for this to work well.'''
 
== 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:
 
<source lang="php">
 
$params->def( 'page_title'      , $title );
 
$params->def( 'page_description', $description );
 
</source>
 
Add this code before:
 
<source lang="php">
 
if (strcasecmp($_GET['view'],'category')==0) {       
 
  $description = $database->GetOne("SELECT description FROM #__categories WHERE id={$_GET['id']}");     
 
}
 
</source>
 
 
 
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, <nowiki>''</nowiki>, $path);
 
- $vars['format'] = $suffix;
 
+ if ($suffix == 'htm') {
 
+ $path = str_replace('.'.$suffix, <nowiki>''</nowiki>, $path);
 
+ $vars['format'] = 'html';
 
+ } else {
 
+ $path = str_replace('.'.$suffix, <nowiki>''</nowiki>, $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
 

Revision as of 13:17, 3 November 2013

Getting started with SEO
Nuvola arrow right.png
Troubleshooting SEO problems
Star icon.png
Advanced SEO
Advanced icon.png


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.