If you build good content, they will come.

You’ve been hired to make a web site for a client. They want something attractive, easy to use and they want good search engine ranking. So you get right to work. You design an amazing graphical layout and add all lots of useful features using Ajax and javascript. Now, for the search engine optimization.

Wait one minute. Back it up Barney Rubble. If you’re going to be efficient in what you do, you need to start thinking about search engines at the very beginning before anything else you do. The single most important aspect of designing web sites is writing good content. I know, I know. You’ve heard this before, but what does it really mean? There is one easy way to figure out if you’ve achieved good content: Read your site as if you were a search engine.

I’m shocked with some of the web sites I see people make. They’ll make a great graphical header for their site with a fancy title and tagline. However, search engines can’t read those header graphics. Pop open the source of a web page and take a look. I’ve seen many sites where you can’t even find the title of the site or its tagline anywhere in the source! No joke.

Search engines will look through your source and try and make sense of your document based on its HTML structure. Main headers should be in <h1> tags, sub headers in <h2> tags, paragraphs in <p> and lists (such as menus) in either <ul> or <ol>. When your page is laid out logically in a format that makes sense, search engines can make sense of your page. What do you think a search engine will consider more important: An image tag with an alt attribute set to “My Widget Store” or an <h1> tag containing “My Widget Store”?

Whenever you put text in an image, you are hiding it from search engines. The text you put in images does not get indexed. Adding an alt attribute to images helps a little bit, but it doesn’t help as much as adding a proper HTML tag. There are many good ways to replace text with images using CSS. So make your menus and titles actual text in your HTML. Let search engines know what you’re writing about and linking to.

What about JavaScript and Ajax-driven pages? Well… What do you think? If all the content on your site is generated on-the-fly using Ajax, then you’re assuming that search engines are going to have JavaScript and XMLHttpRequest abilities. And if they don’t, then the search engines get absolutely no content to index your site. There is no easy solution to this problem, but there is at least one trick that will be of help. Whenever you have a link (<a> tag) containing a JavaScript action, be sure to make an equivalent page and link to it using the href attribute. Then in your onclick event, call your JavaScript but be sure to “return false;” as the last thing you do in that event. By returning false, you cancel the href for anyone with JavaScript enabled. Anyone that doesn’t have JavaScript, including our beloved search engines, gets a new page with equivalent content. This takes a bit more work, but pays off in the long run.

By writing meaningful content, you enable search engines to understand the content of your web site. Your goal should always be to make your content accessible and understandable without any styling or images. If you stripped out all your images, JavaScript and CSS, will your site still make sense? Try it! Read your site like a search engine and you will be making a giant leap towards better search engine indexing. More people will be able to find what they’re looking for and your ranking benefit.

2 replies on “If you build good content, they will come.”

Good article, but I would disagree with you on one point: that alt text in an image is less good than using CSS image replacement. As long as that image is inside an h1 tag, it should perform about as well as straight text in an h1. What I mean by that is that h1 + img alt= would still rank higher than the equivalent h2 + text.

Robert: It’s hard to say exactly how and what search engines will give more weight to, so you may be right that an alt tag in <img> is sufficient. I sleep better at night when I use straight text inside the <h1>. Plus using text has the added advantage of being completely legible on small devices such as blackberries and cell phones, whereas images may be scaled so small that their text becomes impossible to read.

Leave a Reply to roberthahn Cancel reply

Your email address will not be published. Required fields are marked *