HTML file being edited by vim.

Making Money with Search Engine Optimization

Search Engine Optimization

First, What Is "Search Engine Optimization"?

Search Engine Optimization, or SEO, is the technique (or black art) of tuning web pages or an entire web site so it appears higher in the search results for search engines.

Maybe you just have a mild form of megalomania and want to appear as the world's authority on some arcane topic. But more constructively, maybe you are using the Internet to market a business, or you simply have AdSense advertising on your pages and you would benefit from people seeing your pages and clicking on ads that interest them. You could make some money at this.

Plan Ahead

In what areas would you like to stand out? It is easier to be the biggest fish if you pick an adequately small pond. Of course, it must be an area related to the business you are trying to market, or if you're just looking for AdSense clicks, an area that people will actually want to look at. However, I have been surprised to notice some of the patterns in my Apache server logs. I have also found pages of mine ranking surprisingly high for some search strings I would not have expected:

turkish grammar
how to build a linux kernel
tcp/ip configuration commands
build oscilloscope probes

Decide on a set of keywords or search strings and keep those in mind as you design your site.

Overall Site Design

Make things easier for you and more obvious to the search engines by using file and directory names that describe content. On my site this includes, among others, these directories holding hierarchies of pages:              A variety of nonsense            Ham radio, shortwave listening, etc    Information security            Switches, routers, network protocols        A grab-bag of various technical topics.                Pictures of other people's plumbing           Travel stories and picture collections          Turkish grammar            Linux / UNIX / BSD

It really helps if the URL includes likely search terms. Notice that the URL for this page contains the file name search-engine-optimization-howto.html.

Use an Appropriate Page Creation Tool

Use a simple text editor to create simple and clean HTML, or risk being ignored by search engines.

I create all my pages with vim, the new generation of the classic UNIX vi editor.

Your HTML page source should be easy for a human to read. The search engine spiders have limited patience. If the actual text content is a small percentage of the page content, as is the case with the expensive web authoring software, the search engine spider will give up quickly.

Put another way, if you want a relatively low search engine ranking, then use something like Microsoft Word to author your pages.

Keeping the HTML simple has two added benefits. First, it makes the pages more portable between browsers. That is, your page will look almost the same regardless of browser or client operating system. Second, a smaller page is served up faster with less network load at both server and client end.

Search engine optimization carried out by
				editing an HTML file with the vim text editor.

Editing an HTML file with the vim text editor. Notice the color coding. Learn HTML syntax and how to use a simple text editor!

The <head>...</head> Section of the Page

The page title is the most important feature of the page, at least in terms of the effect it has on a per-character or per-word basis. You rank much higher in a search when the page title includes the search string or keywords. Also remember that the page title will be shown in the search results. You are not just trying to appear high in the list, you want people to click on the result and go to your page. So, if you're too far down the list they'll never see you, but you need to seem interesting enough to get them to bother looking at your page. See the title field for this page:

<title> How to Make Money with
	Search Engine Optimization </title> 

Yes, I agree that the "How to Make Money" part is awfully crass. But it's there for a reason....

GoDaddy offers a free "Top Ten SEO Checklist" analysis service for its customers. For the title they recommend:

The description field is also very important. Depending on your page content, the search engine will either use the description metadata field or what it thinks is the opening text on the page. Provide a meaningful description string so people are enticed into looking at your page. There's also a keywords metadata field, and while there are never-ending arguments over its importance, it's easy to create and can't hurt if done correctly.

<meta name="description" content="How to optimize your
	web pages so Google and other search engines will
	discover them and give them high rank.  That leads
	to business, ad clicks, and benefits for you." />
<meta name="keywords" content="search engine optimization,
	SEO, AdSense, Internet marketing, web site, web pages,
	authoring, HTML code, validation" /> 

The descriptions and titles should be unique. That is, do not have multiple pages with identical titles or descriptions.

GoDaddy recommends a description length of 25 to 35 words, all alphabetic, and a list of five to ten keywords or keyword phrases. They say that the keywords should be those occuring most frequently on the page, but it seems to me that a well-written document explaining a topic will dedicate text to explaining about the topic, not mindlessly chanting it over and over.

Start the Page With an <h1> Header, and Use Smaller Headers Below

Yes, <h1> headers are awfully big and bold, but that's their point — they are the highest-level section header. Search engines don't care about your fussy specification of font face, serif versus sans serif, color, and so on. In fact, too much of that messy bulk and the spider will give up sooner. Search engines do pay much attention to strings used as headers. I usually start a page with an <h1> header very similar to the page title. This <h1>...</h1> header should reinforce the title and contain the main keyword or key phrase of the page.

Search engines also pay some attention to bold or emphasized text, especially in the early part of the page. I use some of my bold text simply to emphasize things, but I also do some of it to point out strings to which I would like the search engines to pay special attention. See the very first section of this page where I emphasized the strings "Search Engine Optimization", "SEO", "market a business", "AdSense advertising", and, of course, "You could make some money at this."

Learn and Use Cascading Style Sheets (CSS)

CSS provides easily managed central control of style. That makes it easier for you to create and maintain pages with pleasant appearance. Meanwhile it greatly limits the bulk of the page, so the search engines see a higher ratio of meaningful content to HTML bulk. Here is a CSS example, notice how the text is in a differently colored box:

CSS example 

The HTML code for that example block looks like this:

<pre class="bordered">
CSS example </pre> 

The search engine just sees the content, CSS example. Your browser also asked my server for the CSS file /css/style.css so it understands what the bordered class of <pre> means. I have defined bordered to mean just what I want it to when it's applied to <pre> text: inside a thin black border with a slightly different background color than the default page background (also specified with one line in one file with CSS!). My /css/style.css file contains this:

pre.bordered {
	background : #e2c49c;
	border-style: solid;
	border-width: thin;
	border-color: #808080;
	padding-left:   5px;
	padding-right:  5px;
	padding-top:    2px;
	padding-bottom: 2px;

Without CSS, you would have to instead code every apparently simple one-line text box this way:

<pre style="background : #e2c49c;
	border-style: solid;
	border-width: thin;
	border-color: #808080;
	padding-left:   5px;
	padding-right:  5px;
	padding-top:    2px;
	padding-bottom: 2px;">
CSS example </pre> 

Now imagine doing that for every example box, and picture caption, and so on. The meaningful content disappears into the dull background noise of style markup. That leads to:

No Flash
No Frames
No "Your Browser is Inappropriate" Nonsense

Seriously. Those just block the search engine spiders. And in the third case, advertise to the world that you don't know how to write simple HTML.

Stern browser compatability warning.

Let me repeat this:

A web page, or worse yet, an entire site, that insists on the browser running Flash is effectively telling the search engines to ignore it.

Have Plenty of Meaningful Content

This should be obvious, but many page authors clearly miss the point. GoDaddy recommends 300 to 700 words.

Pictures of text are nearly worthless on their own. Use actual text. The search engine spiders do not download image files and analyze them. They just see that a picture appears there with certain markup code around it. The small image in the above section shows a picture of some English words, and the larger image above shows a picture of some HTML code, but that English text "Best viewed from ..." is not seen by any search engine.

Successful search engines may more capable of handling human language than you would expect. For example, Google seems to be reasonably capable of handling verb conjugations, at least in English. That is, treating optimize, optimized, optimizing, and maybe optimization as equivalent. So don't worry about spraying every variation of every keyword all over the page title and headers.

In fact, Google is quite sensitive to attempts at keyword spamming or attempts to trick it. Annoy search engines' automated processes at your own risk.

Some people think it would be useful (if rather unethical) to simply copy and paste a bunch of Wikipedia text into their pages. Guess what, Google is already very aware of Wikipedia. Your copy of chunks of Wikipedia text won't count for very much at all in Google's page ranking calculations. Paraphrase, summarize, and show some ethics.

Have Links In And Out

Google thinks your page is far more authoritative and relevant if other well written pages on the same topic have links pointing to it.

Good luck making this happen. Spamming webmasters with messages begging for link trades will just waste your time and annoy others.

Paying to have a link to your page listed on one of the millions of so-called "link farm" pages is an effective way of transferring your money to link farm operators, but it accomplishes nothing else.

You also need links between the pages of your site, at least enough so the search engine spider can find its way to all of your pages. GoDaddy claims that every page needs a link to every other page in your site, something clearly impractical when you get beyond a few dozen pages.

Create a site map with links to all the other pages, and with a link to the site map from every page. My standard footer, included at the bottom of every page through PHP, easily accomplishes this.

Write Valid HTML Code

Google is willing to look at any page, but it pays more attention to valid HTML.

It is easier to create fully valid HTML when you use a simple text editor to write your pages. Every one of my pages has the same standard footer included through PHP. That includes a pair of links for validating the page's HTML and CSS. Those linked logos aren't there to brag, they make it easy for me to validate my own pages.

Verify your HTML code with:, and verify CSS style markup with:

When you need characters outside of the standard but simple ASCII character set, use the standard HTML character encoding if that solves your problem, or use Unicode for more exotic characters:

Don't worry, Google seems to understand the concept of character classes and handle Unicode just fine. That is, all these words would be treated the same in Google searches: foo, fòò, fóó, fôô, fõõ, föö, føø, fōō, fŏŏ, főő, and so on.

Use Images

Beyond bringing viewers in through image searches, I suspect that a page with an image or two seems a bit more authoritative to Google. Especially if the image HTML code is carefully constructed.

That's why I put that fairly bulky GIF image of my vim session higher in the page. Here's the code I used:

<div style="float: right; margin-left: 10px;">
<img src="pictures/html-authoring.gif"
	alt="Search engine optimization carried out by
		editing an HTML file with the vim text editor."
	style="margin-bottom: 0px; padding-bottom: 0px;"
	class="bordered" />
<p class="caption" style="max-width: 596px;">
Editing an HTML file with the vim text editor.
Notice the color coding.
Learn HTML syntax and how to use a simple text editor!

Three things seem important here. First, use meaningful alt="..." text. Not just a keyword or two, but prose, ideally a sentence or two or even three. Second, include nearby text reinforcing the alt="..." concept. Third, at least for image search, give the image file a somewhat meaningful name. For example, html-authoring.gif instead of something like dscf4352.jpg.

Be careful with this! You might really get hammered with unwanted traffic if you seem to be a significant source for images of some commonly desired topic.

Analyze Your Logs

Look at your Apache logs to see what pages are being viewed, and why. The log /var/www/logs/referer_log will show the searches done to reach your pages.

Learn to use common tools like grep and awk.

Consider Using Google AdSense

If nothing else, Google AdSense gives you immediate feedback on what the Google search engine thinks your pages are really about. I have found it very helpful for finding where I need to add or modify content to make the page topic seem to Google what I intended it to be.

Once the ads become fairly relevant to the page, they will generally be for things of some interest to the people viewing the page. That makes it more likely for them to follow the ad links and earn you a few pennies.

Most readers are impatient, so ads placed higher on the page are probably a better investment of your effort and bandwidth. Of course, someone interested enough in the topic to read all the way to the bottom might then be more likely to be so interested in the topic as to then check out the advertisements.

I have a page explaining how to use Google AdSense within valid XHTML. See that page to learn how to add AdSense and keep your XHTML valid.

HTML Tools
Various Technical Topics