Feb 23, 2009

How HTML markup affects Google search results

No one knows exactly how Google ranking features work. Google keeps it hidden for obvious reasons: Google wants to maintain better search relevancy and prevent optimizers from moving sites to a higher position in search results.

Several months ago I redesigned several of our sites. Yesterday I checked and found that these sites are on the top position in Google for some popular search terms. I did not expect that really. The content there is good and it is not changed much. However after the redesign site has moved up.

I think the reason is my changes to the markup. Earlier it had a lot of <div> and <table> tags. Now the markup reflects the logical organization of the information. This worked good and I want to share some principles of such design. Here they are:

  • Use minimum markup. Markup to content ratio counts! The lower this ratio—the better.
  • Use semantic markup. If items are arranged as a list, use <ul> or <ol>. This is how news are organized on the home page of this site. It is a list. This book should help you know more. Get it, it is invaluable!
  • Move content block to the top of the markup. While not confirmed by Google I feel that Google likes the content at the top better than when content is at the bottom
  • Place logo and navigation to the bottom of the template. Use absolute positioning to place them in the proper place on pages
  • Use rel="nofollow" for external links that you are neutral about. For example, the link to Packt Publishing on the right has this attribute.
  • Always inline CSS and JavaScript to temporary files with TYPO3. Or better get rid of that CSS and JavaScript at all. If you need it, place it into one of your CSS files.
  • Make sure that pages are valid. It is not enough to validate only the template! TYPO3 sometimes may produce invalid HTML even if your template is valid
When the site is up, test it. Here is what you should use for testing:
  • a text browser like Lynx. You can also use the online version. This will tell you how Google sees your web site.
  • a W3C validator. This will check your pages for errors. Fix them all.

After testing make sure you have a sitemap added for your site in the Google Webmaster Central. Unfortunately none of existing TYPO3 extension produce Google sitemaps correctly. Soon I will publish an extension that does. Currently it is being tested on this site.

I hope that these steps will help you to make better sites and achieve better positioning in Google search results. Of course you also need to have a good content for that. But it goes far beyond this article.

No comments:

Post a Comment