Search Engine Optimization in Joomla!

Exclusive offer: get 50% off this eBook here
Joomla! Cash

Joomla! Cash — Save 50%

Money-making weapons for your Joomla! website

$20.99    $10.50
by Brandon Dawson Tom Canavan | November 2007 | Joomla! Content Management Open Source

Search-engine optimization, or SEO, refers to the process of preparing your website to be spidered, indexed, and ranked by the major search engines so that when Internet users search for your keywords, your website will appear on their results page. Proper search engine optimization is a crucial step to ensure success and should be undertaken with care and diligence.

This article by Brandon Dawson and Tom Canavan, takes a look at Search Engine Optimization and how it can be used in Joomla! to build a successful website.

What is SEO?

Search-engine optimization, or SEO, refers to the process of preparing your website to be spidered, indexed, and ranked by the major search engines so that when Internet users search for your keywords, your website will appear on their results page. Proper search engine optimization is a crucial step to ensure success and should be undertaken with care and diligence. It should also be noted that SEO is an interdisciplinary concern, combining web design functions with marketing and promotional concerns. If aimed properly, SEO would be a powerful weapon in your arsenal.

Proper SEO is:

  • Optimizing META data
  • Optimizing page titles
  • Optimizing page content
  • Selecting proper keywords
  • Testing your optimizations
  • Promoting link popularity
  • Using standards-compliant HTML
  • Optimizing image ALT tags
  • Using a logical website structure
  • Validating your content

Proper SEO isn't:

  • Keyword spamming
  • Hidden text
  • Cloaking content
  • Link-farming
  • Excessive content or site duplication
  • Paying for questionable links

Structural Optimization

Optimizing your site's actual structure and presentation is the most immediate approach to SEO. Since these factors are under the immediate control of the webmaster, they represent a foundational approach to the SEO problem. Once you've optimized your site's structural components, you can optimize the promotional aspects of SEO, which we'll discuss momentarily.

Items That Search Engines Look for in Your Site's Content

It's important to remember that today's search engine rankings are determined by highly sophisticated algorithms. Trying to stay one step ahead of the major engines with bad tactics is not only a very bad idea, but also a waste of time. Well written content will win repeatedly. Giving the search engine robots a well prepared sitepage contributes in promoting your site.

Three items that many search engine robots look for are:

  • Relevant page titles to your content
  • Relevant keywords and descriptions (META tags)
  • Relevant, keyword-rich content, presented in clean and valid HTML

Take a note of the recurring theme—"relevancy". If your site is relevant in terms of what the user is looking for, you will achieve respectable search engine rankings without any additional promotion. However, this is not a place to stop, as search engines correlate your site's standings among your peers and competitors by evaluating certain external factors.

External Views of Your Site by Search Engines

Search giant, Google, likes to describe its proprietary algorithm, known as PageRankTM, by discussing how the external factors can accurately define your site's relevancy, when considered along with your site's actual content. Most search engines today follow this formula in determining link popularity. Some popular items that are used to measure are:

  • How many websites link to yours
  • Where they link in your content
  • What words are used in the actual link text (i.e. the description of the page)
  • The topical relevancy of the sites that link to your site

The power of web search lies in the search engine's ability to provide accurate and relevant results that someone can quickly use to find the information they seek. More importantly, the other end of the search process guarantees that the visitors we draw from search engines are truly after the information or services we provide. Another way to look at it would be it's the right message, but the wrong person.

Thus we see that our interests, the interests of the search engines, and the interests of web surfers actually coincide! If we tune our content properly, and connect our content with similarly relevant content, we can expect to be rewarded with targeted traffic eager to devour our information and buy our services. If we try to deceive the search engines, or common people, we deceive ourselves. It's that simple.

Optimizing META Data

Metadata is the data about the data. It's the section where you define what a search engine should expect to find on your page. If you've never taken note of META tags before, then take a brief tour of the Web and view the source code of several websites. You'll see how this data is organized, primarily into descriptions and keyword listings.

Joomla! provides functionality for modifying and dynamically generating META tags, in the Site | Global Configuration | Metadata dialog, as well as within individual articles via the META tab on the right-hand panel.

This is where the dynamic aspect of metadata becomes important—your main page will have certain needs for proper META optimization and your individual Joomla! content articles will require special tuning to make the best of their potential. This is accomplished though key words and phrases scattered through out the text. Keep in mind that each search engine is different; however keeping ratio of about 3 to 1 for keywords and META (keyword) in the top 1/3rd of the page is a decent rule of thumb.

Using the Site | Global Configuration | Metadata dialog, is pretty straight forward.You can enter descriptions, keywords and key phrases that are pertinent to your siteon a global level.

You should select the META keywords based on the keywords appearing in your content with the greatest frequency. Be honest and use META keywords that actually appear in your content. Search engines penalize you for over use of keywords, known as keyword stuffing.

Title Optimization

What's in the actual title of your page? The keywords you insert into your site and article's titles play a huge role in successful search engine optimization. As with META tags, the key is to insert frequently-used, but not stuffed, keywords into your title, which correlate the relevancy of the site's title (what we say about our site)with the metadata (how we describe what it's about) and the actual content, which is indisputably "what the website is about".

Content Optimization

Writing clear content that uses pertinent language in our intended message or service is the key to content optimization. In your content, include naturally-written, keyword-rich content. This will tie into your META tags, title description and other portions of your site to help you achieve content relevance and thus higher search engine rankings.

One note of caution—while we use our best keywords frequently within our text; we should not cram these words into our content. So don't be afraid to break out the thesaurus and include some alternative words and descriptions! Good content SEO is about achieving a balance between what the search engines see, and what your readers expect on arrival.

Keyword Research and Optimization

Researching our keywords not only gives us an idea of how our competitors are optimizing their websites, but also gives us a treasure-trove of alternative keywords that we can use to further optimize our own sites.

There are several online tools that can give us an idea of what keywords are most typically searched for, and how the end-users phrase their searches. This provides avital two-way pathway into the visitor's minds, showing not only how they reach the products and information they seek, but also how they perceive those items.

You can find a listing of free keyword research tools at:
http://www.joomlawarrior.com.

For our example, we'll use Google's freely available keyword suggestion tool for its AdWords program, and use Joomla! itself as our intended optimization candidate.See http://www.google.com/adwords for the keyword tool. The following example will demonstrate the AdWords tool and how it helps you determine good keywords for your site.

Entering joomla into Google's keyword suggestion tool yields the following display:

Search Engine Optimization in Joomla!

The three key pieces of information as seen in the previous figure, which help us inmaking a decision about keywords, are as follows:

Keywords: This column indicates the keyword whose Search Volume and Advertiser Competition we want to check.

Advertiser Competition: This is graphical indicator of how many ads are in rotation for this keyword.

Search Volume: Graphical indication of how many people in the world are searching this keyword for a product or service.

As we see from the example, when we search for the keyword joomla we see a lower Advertiser Competition than content management system, but a higher SearchVolume. If we then examine open source we see a heavy Advertiser Competition, but the same Search Volume as joomla.

What this means is that if we advertise in the crowded keyword space—"open source", we can expect a lot of competition. Changing our keyword to Joomla! would give us less competition and about the same Search Volume. If we advertise something related to Joomla! then that would be the best choice. However, if we were advertising a tool for open source, we would want to spend our money on the keyword "open source". The last take away from this is if we are selling a joomla template, you see from the figure that there isn't much competition (at the time thiswas taken), but a healthy amount of Search Volume.

Joomla! Cash Money-making weapons for your Joomla! website
Published: November 2007
eBook Price: $20.99
Book Price: $34.99
See more
Select your format and quantity:

Using SEO in Joomla!

There are several paths to optimize your Joomla! website. Joomla! offers basic SEO functionality right in the core, and can be partnered with third-party plug-ins, extensions, and components to further optimize a site and its contents for indexing.

Using Joomla's Core SEO

Joomla! provides some terrific basic SEO functionality right in the core, which can be accessed through the Site | Global Configuration dialog in the Administrator's Control Panel.

Search Engine Optimization in Joomla!

Once we've set the Search Engine Friendly URLs option to Yes, we'll be reminded by Joomla! to copy the contents of the htaccess.txt file to .htaccess.

What is .htaccess?

.htaccess is a special file, read when the web server first accesses a file in a directory that gives special instructions on how to handle the files therein. Specifically, the .htaccess file provides instructions on how to translate Joomla's URLs into an easier format for both the search engine spiders and humans. For example, a non-friendly Joomla! URL might look as follows:

http://www.myexampledomain.com/index.php?option= com_content&cat=2&id=2

After being made friendly, this URL would show up in your browser's address bar as:

http://www.myexampledomain.com/content/view/2/2/

This helps bypass issues with search engines being unable to index content that is "deeper" than simply index.php.

Copying htaccess.txt to .htaccess

Either from a console shell, or via FTP, simply rename the htaccess.txt file to .htaccess, enable the SEO feature in Site | Global Configuration | SEO in the administrative console of the Joomla! site, and you should be ready to go!

Are we Done Yet?

As we've already discovered, for best effect, we want some of our actual keywords in our URL, and we want our URLs to reflect the structure of our site. Thus, we will probably want to take the SEO fight further, by using a component to further rewrite our URLs with even-friendlier URLs. To do this, we simply obtain our SEO/SEF component of choice from Joomla!'s extensions site.

There are several such components available. We have chosen the popular OpenSEF package.

Installing and Configuring OpenSEF

At the time of writing this book, the 2.0.0-RC5_SP2 version of the OpenSEFcomponent is available and can be downloaded from the Joomla! forge website at: http://forge.joomla.org.

One word of caution—OpenSEF may not work with all extensions; therefore it iswise to check with the author's website about the extensions as well as do extensivetesting to ensure compatibility prior to putting it into production.

Installing

The component installs as normal, through the Installers | Components dialog. However, we still have much to do after we've installed it. We must tweak the .htaccess file to use our new component's SEO logic, rather than Joomla's core SEO logic. To do this, we "comment out" Joomla!'s core SEF in .htaccess, and "commentin" the 3rd Party SEF section:

########## Begin - Joomla! core SEF Section
############# Use this section if using ONLY Joomla! core SEF
## ALL (RewriteCond) lines in this section are only required ## if you
actually
## have directories named 'content' or 'component' on your
## server
## If you do not have directories with these names, comment ## them
out.
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]
##optional - see notes##
RewriteCond %{REQUEST_URI} (/|.htm|.php|.html|/[^.]*)$ [NC]
RewriteRule ^(content/|component/) index.php
#
########## End - joomla! core SEF Section
########## Begin - 3rd Party SEF Section
############# Use this section if you are using a 3rd party (Non
Joomla! core) SEF extension - e.g. OpenSEF, 404_SEF, 404SEFx, SEF
Advance, etc
#
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]
##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|.htm|.php|.html|/[^.]*)$ [NC]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule (.*) index.php
#
########## End - 3rd Party SEF Section

All this involves is removing the # characters from the lines in the 3rd Party SEF Section, while adding # characters at the beginning of the lines in the Joomla! Core SEF section.

Now that we've settled these prerequisites, we're ready to configure OpenSEF. The OpenSEF configuration dialog is located at Components | OpenSEF | Configuration:

Search Engine Optimization in Joomla!

Enable OpenSEF by selecting Yes in the OpenSEF Enabled? option. The other options on the Basic Settings screen are administrative, so we'll switch to the SEF tab. Here we have an array of options to control how OpenSEF alters and redirects URLs:

Search Engine Optimization in Joomla!

Most of these options are fairly straight forward, but pay special attention to the Section Title Fields and Category Title Fields, as well as the Content Title Field. These controls alter how your redirected URLs will display.

An important field you might want to pay close attention in the SEF tab is the 404 Not Found URL, which can be set to index.php or a custom 404 error page.

Moving on, the Replacements tab provides an alternative mechanism for manually replacing certain problematic characters. Should you have trouble with you third-party components and redirected URLs, click on the Core Alias tab and review the settings as shown in the following figure:

Search Engine Optimization in Joomla!

Some common problems occur in situations where the "alias" URLs conflict with actual, physical URLs in your structure, so keep a close eye on these situations, as they will cause your redirected URLs to display errors.

Most of these problems can be addressed by excluding OpenSEF from redirecting for certain components. This option is available in the Components tab.

The Features, Advanced, and Metatags tabs provide advanced functionality for the OpenSEF component, with the Metatags function expanding on Joomla!'s core capabilities in that department. These options are quite straight forward for the most part, but for an exhaustive description of their functions, consult OpenSEF's documentation. It is worth nothing that some third-party components will fail when using OpenSEF. Review the forums for your third-party extension problems. And don't forget to test, test, and test.

Tip for Using OpenSEF

At this point, we click Save, and refer back to our main page to verify proper operation of OpenSEF. Note that OpenSEF will not "rewrite" URLs until a given article has been accessed; for a big site with lots of existing articles and content, it may take some time for your visitors to do this work for you by clicking around your site.

Here's how the rewritten URLs appear on http://www.joomlawarrior.com:

Search Engine Optimization in Joomla!

As we can see, we've now been rewarded with keyword-rich addresses that combinewith Joomla!'s dynamic page titles to effectively account for two of the most important aspects of proper search engine optimization.

Using the Sitemap Feature

Google gives great importance to sitemaps; giving sites that use a well-organized sitemap priority in its search-indexing. OpenSEF includes a built-in function toquickly generate and put a sitemap to use.

We begin configuring our sitemap by entering the OpenSEF configuration dialog and clicking on the Google Sitemap tab.

Search Engine Optimization in Joomla!

Configuring OpenSEF's Sitemap

XML file name:

This entry simply controls the filename of the exported XML RSS feed file. It's best to use a descriptive name.

Sitemap Location:

By default, OpenSEF might output your sitemap to the components/com_sefdirectory, but we'll want to have this in our site's root to be truly Google compliant. As such, simply take this field and blank it out.

Last Modified:

Allows you to specify whether your site's Last Modified date should be the current date, or the date of the most recent change as stored in your site's database.

Change frequency:

Tells Google, or the other search engines, how often to expect the site's content to change. This allows for more efficient indexing by the robots, and speaks to how relevant your site is, by defining how current you keep your site.

Priority:

Refers to the relative priority of deep pages, when compared to your index page.

Display Edit Screen after Scan:

This is simply a precaution against a lengthy list of articles to be inserted into the sitemap causing the Control Panel to display a blank screen.

Generating the Sitemap

Now that we've specified our settings, we can generate the sitemap. We start by simply clicking the Generate XML option from the left-side menu in OpenSEF:

Search Engine Optimization in Joomla!

Once we've done this, we'll see a list of available content items to be considered for our sitemap. OpenSEF includes everything, so we'll want to carefully edit each entry,and avoid giving undue indexing priority to our advertisements, links, FAQ, and other ancillary content to the detriment of our main content items.

Search Engine Optimization in Joomla!

Once we've checked the articles for inclusion in our sitemap, we can simply click Save XML File and create our sitemap.

If you get a message saying that the sitemap could not be generated, you have a permissions issue. You can perform either of the following steps:

  • Create a blank text document with the yoursitemapname.xml format andu pload it via FTP and CHMOD it to the proper permissions for writing by the web server.
  • If you have access to the console shell, you can simply enter touch yoursitemapname.xml, and then CHMOD.

Assuming that everything's working properly, your sitemap will be generated, and you'll be apprised of such by the proceeding dialog. You're now ready to submityour sitemap to search engines!

Submitting the Sitemap

You can submit your newly-generated sitemap not only to Google, but also Yahoo, viatheir Site Explorer option, available at http://siteexplorer.search.yahoo.com.

You'll be asked to verify the ownership of your site, by either including a special META tag within your site's HTML, or by uploading a special HTML file to your website's root.

To insert a META tag, insert it into the META section of your template via the Site |Templates | Edit HTML dialog.

SEO Conclusion

"If you build it properly, they might come." That's the hard lesson borne by hundreds of website launched in the last ten years. What we've really been talking is about building the foundation of our "house", and now we need to see about making our house livable for our guests and visitors.

The key to proper SEO, once you've mastered the basic aspects and their interactions, is to test, test, and test! If you do not achieve the rankings you want, try adding or subtracting aspects of the title, META tags, or SEO settings till you start achievingthe results you want.

However, remember that SEO is a trailing indicator—Changes you make today maynot be reflected in your search engine rankings for a couple of weeks, so remember to be patient as well.

However, we cannot expect to achieve real success on the basis of our efforts alone. Itis imperative to involve our visitors in this process as quickly as possible, so we can sit back and watch our content spread across the Web like a tidal wave.

Joomla! Cash Money-making weapons for your Joomla! website
Published: November 2007
eBook Price: $20.99
Book Price: $34.99
See more
Select your format and quantity:

About the Author :


Brandon Dawson

Brandon Dawson is a 29 year-old website developer from Lancaster, Ohio in the United States. He has completed Joomla! projects for clients ranging from major corporate clients, such as Apple Incorporated, to small local businesses. He maintains a business website at www.athenainternet.com.

He enjoys building websites, hiking, cycling, and spending time with his fiancée and their son. He is also a huge movie buff from having spent his college years operating a small local movie theatre.

He frequents the Joomla! support forums, and maintains personal websites at www.joomlawarrior.com and www.brandondawson.org.

Tom Canavan

Tom Canavan has been in the Computer and IT industry for 20+ years where he spent several years as a Systems Consultant to many Fortune 100 clients and other global companies.

Canavan is considered a top security and disaster recovery expert in the Joomla world. He is the author of the Packt Published book Joomla! Web Security.

He is a former CIO and is currently the co-founder of SalvusAlerting.com. Canavan contributes articles on security and disaster recovery to several websites.

Books From Packt

Building Websites with Joomla! 1.5
Building Websites with Joomla! 1.5

Learning Joomla! 1.5 Extension Development
Learning Joomla! 1.5 Extension Development

Joomla! E-Commerce with VirtueMart
Joomla! E-Commerce with VirtueMart

MODx Web Development
MODx Web Development

Choosing an Open Source CMS: Beginner's Guide
Choosing an Open Source CMS: Beginner's Guide

Drupal 6 Social Networking
Drupal 6 Social Networking

Django 1.0 Website Development
Django 1.0 Website Development

Practical Plone 3: A Beginner's Guide to Building Powerful Websites
Practical Plone 3: A Beginner's Guide to Building Powerful Websites

 

 

 

 

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software