Whenever making a web directory, it’s improtant to consider if it is search engine friendly before claiming it is. And in all honesty, before even releasing it to the general population.

All too often, I see people promoting their directory (or directories) as “SEO friendly”, but when I visit I often find that the directory is just a standard installation of PHPLinkDirectory [PHPLD], with only the list of categories to distinguish it from the default start page (sometimes). Yes, not even a custom theme (!). This standard install often means the URLS are not “clean” and (sometimes) PR is not passed to categories & sub categories. These directories are far from “SEO friendly”.

I have to wonder what these people’s intentions are? Do they hope that some newbies will purchase featured links, believing it’s a great directory when in fact it is no different from the hundreds of others out there? Or perhaps they are just new to the world of web development and webmaster and do not yet know any better? For those people who want to learn, then I hope this article helps them along their way.

For anyone making their first directory, or wanting to improve a current one, here are a few basic tips:

  1. Chooese a niche, rather than making a general directory.
  2. At least use a theme that is different from the default one.
  3. Even better, make a theme that fits with your directory’s niche.
  4. Create a nice logo, but try to ensure the file size is 15k, or less, for quick loading.
  5. Optimise the HTML and CSS … this can increase page loading speed dramatically.
  6. Ensure your directory’s domain passes PR to the categories & sub categories.
  7. Use so-called “Clean URLs”.

What Are “Clean URLs”?

Clean URLs are easy to follow urls for spiders/crawlers (web robots), e.g. http://www.example-directory.com/category/38/ instead of http:///www.example-directory.com/index.php?catid=38, which can easily be done by editing .htaccess file in the document root of your website’s folder. “.htaccess” is a file which provides instructions to the webserver, including the ability to rewrite URLs. It is also a good idea to make the URLs human-readable, where possible, e.g. http://www.example-directory.com/computers/software/. Fortunately, “human-readable Clean URLs” is usually a feature of the directory script itself, but not always enabled by default. To aid in maximising the search engine friendliness of your web directory, enable url rewriting whenever possible.

What Is PR?/How Do I Ensure My Directory Is Passing PR?

PR [page rank] is a numeric value which respresents how important google thinks a page is. Make sure that every page on your site links to the index page, for example if your site is http://www.mydirectory.com/ then every page will link to that address, or if it is in a subdirectory then http://www.mydirectory.com/subdirectory/linux.php will need a link to http://www.mydirectory.com/subdirectory/. Don’t link to index.php – be consistent on your site and when promoting it on other sites. Also, you should choose between either the www or non-www version of your domain and stick with it. After choosing either www or non-www, set up a redirect so whether the domain is type with or without www the visitor will end up at the consistent and preferred domain name.

How Do I Make The Redirect?

For the apache webserver, just add the following into .htaccess in the “document root” (i.e. the main folder for your website):

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} !^www..*
RewriteRule ^.*$     http://www.mydirectory.com%{REQUEST_URI} [R=permanent,L]
</IfModule>

This will redirect all requests to the www domain. Replace mydirectory.com with your domain name. To redirect all requests to the non-www version, use the following code instead:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^www..*
RewriteRule ^.*$     http://mydirectory.com%{REQUEST_URI} [R=permanent,L]
</IfModule>

How Do I Make A Logo

I personally use gimp as it is free (and is available for Linux, Windows, plus several other operating systems). However, a quick search of google should bring up many other pieces of software for creating logos, including some web-based scripts.

How Do I Create A Custom Theme/How Do I Optimise the HTML & CSS?

Some of the following text is orientated towards PHPLD but some general optimisation tips are also included. The CSS file for PHPLD is stored in “main.css”, which should be in the root of your website’s folder. The html files (templates) are stored in the directory “templates”, and the ones to first look at are:

  • header.tpl: This file contains the page header HTML such as meta tags, links to JavaScript and/or CSS files, beginning of the document body, the header (logo/site name), the site name/description, and search box.
  • top_bar.tpl: This file contains PHPLD’s top menu bar.
  • link.tpl: This file contains code for the actual links listed within the directory.
  • pagerank.tpl: This contains the code for displaying a links Google Page Rank (if the option is enabled).
  • footer.tpl: PHPLD footer code is stored within this file – only remove the link to PHPLD’s website if you have permission/a license.
  • submit.tpl: The link submission form is contained within this file
  • main.tpl: This “glues” together files such as header.tpl, top_bar.tpl, footer.tpl, et cetera, and also contains HTML for categories

On examination of these files, you will first notice a lot of strange-looking code mixed in with the HTML. This is smarty template code (and sometimes PHP). Initially, it might be confusing, so it’s a good idea to read up on customising PHPLD in its forum.

So now you have found the files to edit, what needs to be done next? I always start by looking for tables and removing as much of the table code as possible. Instead of tables, I use div as this will often reduce the amount of code and in combination with CSS styles very beautiful and flexible layouts can be created quite easily. For those of you not familiar with HTML and/or CSS, a good place to start is w3schools.com. Finally, ensure your page validates by using the w3c.org HTML validator.

How Do I Choose A Niche?

Think about topics which interest you and you know a lot about (or want to learn more about). There’s not much more to say on that one really.

To summarise, it can take some time to create a good directory, but I believe that in the long-term it is worth it. A site which genuinely interests you will be a wiser and longer-term investment of time and money than yet-another-dull-general-directory. Make your directory stand out from the crowd, promote it in a targeted manner (i.e. if your directory is about healthcare it’s going to be pointless advertising it on an arcade/myspace site), and it will be noticed.

Creating a good directory also means it will be more “search engine friendly”: valid HTML, human-readable (and easy to follow for a spider/crawler) links to categories/sub categories, will make it easier for a bot to crawl the directory and passing PR will give the directory added value.

I will follow up this article with another one which has more information about customising and SEO-ing PHPLinkDirectory, in particular about editing the template files – not just html/CSS but also the smarty code, too – so check back in a few days for an update.

Share and Enjoy:
  • Twitter
  • StumbleUpon
  • Facebook
  • del.icio.us
  • Mixx
  • Propeller
  • BlinkList
  • Simpy

Related posts:

  1. The Launch of B.E.P. General Directory
  2. Firefox Extensions For Webdevelopers
  3. Supplemental Results Revisited
  4. SEO Mistakes
  5. Part 1: Preventing Image Hotlinking Web Scrapers And Referral Spam