Sunday, September 05, 2010
   
Text Size

Joomla and SEO Part 1

Written by Jeremiah
Rate this item
(0 votes)

Making your site visible and friendly to search engines, is the best thing that you can do for your site. You can have the most beautiful design and all the flash presentations to meet the most vivid imaginations but, does your site perform and are the visitors returning? In this series, I will give you a few tips and secrets that you can use to make your Joomla site, a little more social!

Note- This is only to be used on a Linux based Server. Windows IIS is completely different and I do not have a suitable reference for you, truly sorry.

HTACCESS

What is .htaccess?

In several web servers (most commonly Apache), .htaccess (hypertext access) is the default name of a directory-level configuration file that allows for decentralized management of web server configuration. The .htaccess file is placed inside the web tree, and is able to override a subset of the server's global configuration; the extent of this subset is defined by the web server administrator.[1] The original purpose of .htaccess was to allow per-directory access control (e.g. requiring a password to access the content), hence the name. Nowadays .htaccess can override many other configuration settings, mostly related to content control, e.g. content type and character set, CGI handlers, etc.

Source- Wikipedia

 


We are going to use .htaccess in this example to control content. Joomla has provided every Joomla installation with this file, with common settings for security and for SEO. Bear in mind, not all extensions are compatible with .htaccess by defaults, and you may need to find a suitable CGI and PHP programmer to make some adjustments for those extensions. So, on for more...

Examples of what it will do for us-

URL Structuring-

Without .htaccess-

http://mysite.com/index.php?option=com_k2&view=item2

Notice how this link has all the garbage at the end of it.

With .htaccess-

http://mysite.com/home.html

Notice the /home.html, instead of- /index.php?option=com_k2&view=item2. This is much better for Search Engine Indexing, and adds more relavence with realistic words, and less symbols.


Instructions-

Login to your Joomla Administrator Panel. Go to SITE>GLOBAL CONFIGURATION>SITE SETTINGS.

There will be a list of SEO SETTINGS on the right hand side of the page. Now, stay on this page and open up your FTP Client and connect to your site.

Visit the directory where your core joomla files are. This will be something like-

Administrator-Components-Cache-Images- etc. etc. You will also notice files like- configuration.php, etc. If your in the right location you will find a file titled- htaccess.txt. Rename this file to: .htaccess (Do not forget the . at the beginning). The site will be broken for just one moment, dont fret. Expect it. Now, go back into the Joomla Admin panel, and switch some settings:

  1. Search Engine Friendly URL's- Set to "YES".
  2. Use Apache mod_rewrite- Set to "YES".
  3. Add Suffix to URL's- Set to "YES".
  4. Save and Preview Front Pages of Website.

When checking the front page, be sure to check all your navigation links and see if it is correctly displaying them in the browser address bar, and is accessible when you click on them. Make sure you do not encounter any 404 errors. If you do, something is wrong. Lets debug now.

 


Mod_Rewrite Issues

mod_rewrite may not be supported, enabled, or is preconfigured on your server. Doing it with the above steps tries to enable mod_rewrite, so truly the quickest and easiest way to tell if it is allowable or preconfigured on your server, is to go back and edit the .htaccess file.

Go back to FTP client and find this file, rename it again to .htaccess.txt and save it. Now, you can download and edit it again.

Take a look at this file and read what it has to say-

#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################

##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On


Changes You Can Try

Try This First and Save the file, rename it .htaccess after you upload it.

RewriteEngine On

TO:

#RewriteEngine On

Same goes here.

Options +FollowSymLinks

TO:

#Options +FollowSymLinks

If this still doesn't work, switch all of the settings back to normal- SEO Settings in Joomla Admin Off, and .htaccess renamed to .htaccess.txt. Then, contact your hosting provider and ask them if you are able to use mod_rewrite.

More in this category: Joomla and SEO Part 2 »

Add comment