1 of 3

Tips for designing search engine spider-friendly code

by Irene Lizarraga

Designing search engine spider-friendly code is one of the very first things that can be done to optimize a website for the search engines. A search engine spider reads the HTML code of a website and uses it to find what keywords are more relevant on a specific page and how important they are compared to the rest of keywords on that page. So, if you want to optimize your website for SEO the first step is making sure that HTML code is SEO optimized and spider-friendly.

Use standard (X)HTML code that validates
You can compare the W3C markup validator to a spellchecker for HTML code. If your HTML code cannot pass the test the result is some browsers displaying your website wrong, and search engines suffering from parse errors and maybe even missing some content. Making sure  your HTML or XHTML code follows the standards and best practices will make your code much more search engine spider friendly, and will improve your visitor’s user experience. You can also use the W3C CSS validator to check that your CSS files are also well coded, and will be understood by any of the most popular browsers in the market. It’s worth mentioning that HTML code generated by tools such as MS Word or Frontpage just won’t validate without extensive work.

Move the  CSS and Javascript to external, referenced files
Making your HTML files as small as possible is not only good for search engine spiders, but also to reduce bandwidth costs and the loading time of a page. The easiest way of doing this is avoiding in-line styles or javascript, and moving all of your CSS and Javascript to external files that will be referenced within the head of the HTML document.  Besides making for easier code maintenance and faster loading times, embedding styles and javascript files has a direct effect on Search Engines, since they have a limit on how many characters on each page will they read. While it’s generally accepted to have very specific snippets of Javascript only on the HTML pages that uses it, including all the CSS and Javascript code at the beginning of a web page can cause a Search Engine spider to reach its reading limit and not parse the end of the document, which generally is more keyword rich than any style-sheet.

Don’t use tables unless you want to display tabled information
Tables went out of fashion several years ago, and it was for a reason. First of all, they clutter your HTML code reducing the keyword density of your content that you worked so hard to increase. Second, using tables to position information will wreak havoc on screen readers and search engine spiders may get confused. For example, a keyword split into two table cells won’t be considered a long tail keyword by many search engine crawlers. And third, by using CSS and a div layout you can make sure your website follows coding standards, will look good on most browsers and the information inside it will be loaded much faster. Unless you are showing information that needs to be inside a table, avoid them to make your code as search engine spider-friendly as possible.

Don’t be tempted by Black SEO tricks
Search Engines have gone a long way in detecting and penalising webmasters who try to trick them into giving a website more relevance than it deserves. Some of the most common tricks of Black SEO are using styles to make text invisible (very small, or the same colour as the background) or trying to put as many keywords as possible within H1 tags while displaying it as normal text. If you don’t want to see your website kicked out of the SE result pages, make sure you follow the guidelines Search Engines offer freely and avoid Black Hat SEO. Even Grey Hat SEO has a risk of turning Black at some point, when search engines change their policies to be more restrictive. The key thing to remember is making sure there’s no elements on your page designed to be seen only by search engines.

By making sure your website HTML code is standard, lean and follows search engines SEO guidelines you can start the SEO race with an advantage over the competition. But it will not only be good for your SEO! Having a website that is accessible for users on mobile phones, older computers or screen readers will increase its popularity, while a leaner code will make sure it loads faster and consumes less server resources and bandwidth.

Helium, Inc.
200 Brickstone Square Andover, MA 01810 USA