Where I work, everyone's talking about Search Engine Optimisation (SEO) all of a sudden. Clients who barely knew the web existed a few weeks ago are now concerned about pagerank. What's a web developer to do? Well, if you're a freelance developer the obvious answer is "charge appropriately" but that's another story ;)

I'm yet to understand why an issue as old as SEO suddenly leaps to the top of peoples' buzzword list. However, let's not look a gift horse in the mouth; this is a great time to push web standards. Semantically-correct markup will increase your search rankings, tag soup will decrease it. You don't even have to mention standards, you can just tell the client you are "value-adding by leveraging bleeding-edge methodologies to optimise the search visibility of their pages and increase the ROI on their web presence" [Bingo!].

First off, let's get something straight here. SEO is not rocket science, no matter what the overpriced consultants tell you. The best thing you can do to get good search rankings is make your site accessible, write good content and stick to standards. I had an SEO consultant admit this straight up: If everyone used semantically-correct XHTML, nobody would need us. I'm not kidding and neither was he.

Search engines dig semantics

Why is semantic markup such a big part of SEO? Well, semantically-correct markup defines the structure of a document, which tells the search bots which bits of text are important. The <title> describes the entire document, the headings define the sections, link text indicates what information will be found at the target URL.

Basically, semantics give structure to a document in a way that computers can understand. In this case, the best thing for humans is the best thing for machines too.

Tag soup or semantically-void pages—even the ones that validate—don't have this structure. <font> tags have no semantic meaning, nor do layout tables (no heading cells) or even <div> and <span> tags (no matter how you style them). Only the real thing will do.

Accessibility is good for search engines, too

Search bots will benefit from the same accessibility features as many disabled users. Think of it this way: Search engines are blind, deaf, mobility impaired users with scripting and plugins turned off.

Search bots read the alt="" attribute of your images, since they can't "see" the image. Similarly, they use the alternative content in your <object> tags and not the big, glitzy Flash animation you've embedded. Search bots do not use a mouse, so they won't be onClicking anything. If you use JavaScript to trigger links, windows, navigation etc... search bots won't find any of it.

You can actually get a good idea of what a search bot can find by browsing your site with a text-only browser like Lynx. If you don't have access to Lynx (or an emulation), get into Opera or Firefox and disable everything - images, style (CSS), scripting, java, plug-ins... turn off the lot. Then test your site. Anything you can't see that way is probably not visible to search engines.

Some search engines do try to index PDF, Flash, Microsoft Office documents etc, however they have mixed success. Even if they do read the file, most search engines don't seem to rank such documents as highly as an XHTML equivalent.

Don't try to cheat

Some people ask how they can get onto the first page of results for a specific search term, expecting to hear about some kind of trick. Well, you can purchase "sponsored links" and keyword-based advertising; but there is no way to guarantee a specific place in "organic" search results. Organic results are the results achieved naturally in the rankings by a specific page. There are ways to cheat on organic results, but most of them are detectable and you stand a fair chance of getting blacklisted. Besides, they give you bad 'net karma.

It's important to be realistic about what you will achieve and how fast you'll achieve it. You will not waltz into the top ten for certain keywords ("Search Engine Optimisation" springs instantly to mind). Accept there are no guarantees and no way to ensure a number one rank. Don't hire or pay anyone who claims otherwise.


On top of all of this, most of the leading search engines now pay attention to popularity. Google pioneered this idea: a page with more links leading to it probably has 'better' content than a page with less links, or at least more people have felt it was good enough to link to it. If a popular page then links to something else, that link should get more weight than a link from a page that nobody else has linked to.

As it happens, popularity is susceptible to abuse. This can be fun, for example the various Googlebombs that have taken place; however it can also be used to spam search engines for less amusing purposes. This is one reason some SEO techniques walk a very fine line between legitimacy and blacklisting.

An effective approach to SEO

So what's an effective and legitimate approach to SEO?

  1. Write good content.
  2. Use logical, semantically-correct XHTML.
  3. Meet W3C WAI accessibility guidelines.
  4. Let your organic results find their place.
  5. Be realistic in your expectations.
  6. Don't try to cheat (should I really have to tell you that?).

That's really it. If you want to boost traffic and you have the budget, you might want to get into the Search Engine Marketing (SEM) game; which basically means buying ads according to keywords. Spend wisely and measure your results; but get your SEO techniques done first. SEM is a cut-throat business and you should not enter it lightly.

Key points & principles

  • Bad content will get bad rankings. If you're boring, nobody will link to you.
  • Search engines don't load images, multimedia, stylesheets, client-side scripts or plugins.
  • If you can't browse to it in Lynx (with a keyboard), search bots probably won't find it.
  • Don't try to cheat the system.
    • Don't create pages specifically for search engines.
    • Don't try to pull in searches for irrelevant keywords.
    • Don't use "hidden text" (eg. black-on-black) to feed "extra" content to search engines.
  • Meta-data has been so badly abused, most search engines give their contents a very low priority/weight.
  • Consider how results from your site will look in search results. This will be particularly relevant when writing document titles.
  • Remember that Google is only one of many search engines.

Specific techniques

  • Get the <title> right:
    • Write meaningful <title> tags which are specific to each document.
    • If you include site and section names, include those after the page-specific terms to maximise results (annoyingly, Blogger templates don't appear to allow this configuration).
    • Don't use the same <title> text for every document on your site!
  • Structure heading tags properly and write meaningful heading text.
  • Use concise but meaningful link text.
  • Spell out acronyms and abbreviations in full, or embed the full text in <abbr> tags.
  • Provide alternate content for images and multimedia. Forget Flash.
  • Test your site with basically everything switched off, or better yet test it in Lynx.
  • Don't use long, ugly URLs; some search bots can't follow them.
  • Don't bother with meta-data. If you do, be careful.
    • Some search engines still use the description meta-data for search result summaries; so you may wish to include a concise summary of the document contents in a description meta-data tag. An increasing number generate contextual summaries however so weigh up the investment of time.
    • You may want to add extra terms in a keywords meta-data tag; however be careful not to get too far off the main topic; also don't insert a hundred keywords.
  • Target relevant, popular keywords. You can use adword suggestion tools to look up related search keys to the most obvious keywords:

Further reading

Some good places to continue reading on this topic: