jump to navigation

Beginner’s SEO Corner - Cleaning up the code February 7, 2006

(Visited 17729 times)

What do search engines read? Do they see the exact same thing as we see websites?Search engines see text, and they do not see images. Bear this in mind for two main things.

  1. If your images is an image of text, that text may be important content to be indexed.
  2. Too much code just puts in too much ‘garbage’ in it. Too much unnecessary code that searchs engines do not actually care about, or worse, they might index a bunch of garbage that is not needed.

Now coming up with a tutorial on how to do things would take me all day. Let me try to sum things up in a list of basic things that can be done to make the code better to index by search engines.

  1. Since we want keywords to be read right away by browsers when indexing, it is best to have keywords nearer to the top of the code. Remove all unnecessary html comments, long chunks of Javascript or large stylesheets in style tags. Make javascript accessed in a separate file with the source attribute in the script tag. And make all your styles in a separate css file. If possible also avoid in-line styles using the style attribute.
  2. Master the ways of CSS, it is the future. Tables are out. If you are still making websites with tables, better consider learning tableless. Code is very clean and takes out a lot of garbage text. Here are samples of some full CSS tableless websites: Martal Exterminators Termite Website, Mansmith and Fielders, Inc. Specialist in Marketing and Sales Training and the Philippines Association of Marketing Professors - AME. Try viewing the source, look Mom, no tables! Full CSS websites have many benefits, but that is another topic. Just bear in mind right now that full CSS tabless websites have clean code ideal for indexing by search engines. To learn making CSS tableless sites, I will place reference links below.
  3. Search engines looks at emphasized text too. H1 to H6 tags help, and forming a good outline of flow for them. Although bold and italics may help, they are not that looked into by search engines.
  4. Outbound links are not as important at inbound. But they still help.Let me give you a few examples. Last December, Greg Boser of Webguerrilla, one of the many SEO experts got his website to be number 1 for the search phrase Viagra Handjobs. Imagine how many Viagra websites are out there and he became number 1 with a website not even about Viagra and Handjobs! Not to be outdone by other SEO experts, Jeremy Zawodny, simply made a link to Greg’s site and place a small comment and now, it is Jeremy’s site that is number 1 for Viagra Handjobs. Try searching google now for viagra handjob and the number 1 as of this very moment (this can change tomorrow, we never know, so better try it now.) it goes to Jeremy’s page of links on Hotlinks. All he has is an outbound link going to Webguerilla!
    Here is another outbound link example, although it is not a targetted keyword, but you can just see the power of the outbound link, search on Google, gillette philippines inc and the number 1 site is not even Gillette! It is Mansmith and Fielders Marketing Training in the Philippines. The results is as of this very minute I am typing this post. This can change and by experience, the mansmith site goes up and down since it is not optimized well. And one more thing about these links… use the title attribute in the A tags.
  5. If you have an image that has the logo, company name, slogan, or whatever is written on it, search engines cannot read images. So make sure you either use your alt attributes well, or do a CSS image replacement. There are so many tutorials out there on CSS image replacement and adding text to it. Just search for one.
  6. Avoid flash, but if you really can’t avoid it, use it very nominally.
  7. Avoid frames since crawlers can index the target frame only in some cases.
  8. Writing the content is important, but I will not discuss that here since that is totally a new topic in itself. That is why in the SEO there are already people whose jobs are called SEO Writers since they do nothing but write content.

Gee I can think of tons of stuff, but this will never end. I will end my topic here and will post again on some other topic next time. Just remember, the cleaner the code. The better. Wait for my next post again. - Benj

Resources:

Benj Arriola’s New Technology and Business Blog
Web Hosting, Design and Development, SEO
Domain Registrations
Benj Unfinished CSS Tutorial

(Come back from time to time until you see it done)

Comments»

1. jozzua - February 26, 2006

in essense, what you are saying is that the search engine actually see the source code, right? so non-essential code should be removed and those with your keywords should be prominently placed on top. This would mean that a lot of Content Management Engines (CMS) out there are not SEO friendly. If you look at the code, there are a lot of non-content related stuff. What would be an ideal blog-engine for SEO?

2. Benj - February 26, 2006

You got it right Jozzua. I have a lot of friends that love Mambo and Joomla since it is a quick CMS tool that can be used to make websites right away and still fairly looks good. You can find many resources on templates for them but it is a bunch of tables.

But I haven’t tried every CMS software on the planet, but two colleagues of mine were pretty happy with e107. They told me they were able to do full CSS tableless builds with it.

With my experience, I myself do not like doing all HTML websites and I like using PHP, but most of the time, I make my own CMS from scratch so I make it a point I am SEO friendly.

Since search engines go through everything, it is good to take note of your code to content ratio. And tableless sites are better with this.

Aside from that, but this was more of an issue of the past but it is not much an issue anymore today is having question marks in the URL for passed parameters. Like:

http://www.domain.com/path/file.ext?var1=value2&var2=value2…

Search engines today got smarter and it is no longer an issue, but if you still want to take out the question marks, you can try a mod-rewrite, but in my case where I am not expert in regex codes in the .htaccess files for my mod_rewrite rules, I use the PATH_INFO technique in PHP. Check the simple tutorial here on Zend.

A twist to that is, I add the MIME-Type .keyword and make it behave as .php. But since URL paths can vary in lenghts, depending on parameters passed, your images, css files, js files and links should be using an absolute path. Which also serves the purpose of anti-DNS hijacking.

Although I have my tools for various stuff, I quickly did a search online and just got the first one that came out.

Tool for Code to Content Ratio:
http://www.holovaty.com/tools/getcontentsize/

Tool For Keyword Density:
http://www.seochat.com/seo-tools/keyword-density/

But then again… does it mean a tables site won’t rank high? Or some site using a CMS with a bunch of trash code will not rank high? The answer is it also depends on the competitiveness of the keyphrase. If no one else is targeting the keywords and only a site using Joomla has a bunch of those keywords, most probably, they will still rank high.

In one of the books Marc recommends in his personal blog, “Search Engine Marketing, Inc.” by Mike Moran and Bill Hunt, they often use the words “Assuming everything else equal.” So the same applies too. 2 websites, assuming everything else is equal except one has a bunch of unneccessary code, and the other has short code. Both have the same amount of content, most probably the one with the less code will be on top. It also increases the density of each word.

3. makulitmakulit - August 17, 2006

What happens when the first thing spiders see in a site is the word “subscribe”? Does that mean that the site will be indexed under the search term “subscribe”? I’ve read that these crawlers give more weight to terms that are higher up in the code.

Also how does keyword proximity work? How does having terms close together help improve a site’s SERP position?