Search Engine Optimization for Coders
I attended Desert Code Camp this weekend. It is a free technology event in Phoenix, AZ with speakers presenting on a variety of topics. One of the interesting ones I attended today was called SEO for Coders and was presented by Jerry Ferguson. I don’t know much about SEO, just the basics and this was a good introduction into what I can do as a programmer to assist in optimizing a site for search engines.
Here are some highlights:
- Domain/sub-domain names – Pick a domain name that contains a keyword that you would like to target. If you don’t have control over your domain name, then it’s still possible to create subdomains with a descriptive keyword (e.g., finance.yahoo.com) Domain names should be keyword rich, short, and should be a dotcom.
- Relevant & useful content – Your site should contain relevant and useful content for what you’re trying to optimize for. Two measures of how well your site performs in this regard are keyword density and keyword prominence. See ranks.nl for a tool to help analyze for these measures.
- Page title – Every page should have a title. The title should be reflective of the content contained on that page. Don’t use a generic title for all pages. If you put the domain name in the page title, then it should be at the end to increase the prominence of the title itself (unless you are specifically targeting your domain name as a keyword).
- Page description – Every page should have a description. The description is taken from the description meta tag and is used in the snippet shown by search engines in search results. If the description contains the keywords that a person searched on, then it is shown, otherwise snippets from the page are shown containing the keywords.
- URLs – URLs should be keyword rich as well. Instead of URLs like foobar.com/articles/1 create URLs with keywords like foobar.com/articles/search-engine-optimization-for-coders. Additionally, URL parameters are generally not very useful, such as foobar.com?a=12345&b=woohoo&c=cookie.
- Redirects – Use 301 redirects to maintain a consistent, canonical representation of your domain name. Do not have both a www.foobar.com and a foobar.com. Choose one and go with it. The other should redirect to your choice. If you have both then they’re treated as separate sites and are both indexed by search engines. This will result in duplicate indexed content and search engines don’t like duplicate content. Duplicates are usually shoved into a supplemental index of search results. Additionally, URLs with and without trailing slashes are treated separately. So foobar.com and foobar.com/ are two separate sites in the eyes of a webcrawler. Pick one and go with it.
- Sitemaps – Create a sitemap and submit it to search engines. Presenter referenced GSiteCrawler but it looks like Windows only. Anyone know any free alternatives?
- Valid markup – Create standards compliant sites and everyone wins. If you’re using Firefox, then the Web Developer extension can help you with validation.
- Speed – Pay attention to the speed of your site as it affects not only your user’s experience, but may affect your indexing as well. Again, if you’re using Firefox then try ySlow to help with performance optimization.
There was also a neat Google trick he showed that I didn’t know about. If you search in Google using allintitle it will show you search results that contain those keyword in the page title. Very useful. Try it here to see all the websites out there who forgot to put page titles on their pages
Update: Here’s a link to the presentation.