Log in / create account | Login with OpenID
DocForge
Programmer's Wiki

Search engine optimization

From DocForge

With respect to web development, search engine optimization, abbreviated SEO, refers to making a site which should rank well in natural search results. Since the most popular search engines return results based on users' keywords, this implies aiding search engines in correlating a site's pages with relevant keywords which are descriptive of the content.

The most popular search engines return results primarily based on keywords, ordered or ranked on many factors. To some extent the web crawlers for these search engines attempt to read pages as a human would. So think first of optimizing the site for humans and it will naturally be somewhat optimized for web crawlers.

Contents

[edit] Best Practices

As each search engine has its own algorithm for determining the order of results, there are SEO methods which will help with some search results and not others. In general there are a set of best practices which will help both visitors and most search engines.

[edit] Clean URLs

URLs are descriptive of content. Limiting URLs to be short and contain non-repetitive keywords is helpful to web crawlers. It's also helpful to people as they are easier to remember, and therefore aid return visitors and sharing of the URL. This web site characteristic is often referred to as clean URLs.

Example:

  • Bad: /index.php?id=3
  • Better: /index.php?title=seo
  • Best: /search-engine-optimization

Generally, file name extensions are irrelevant for HTML content, so /search-engine-optimization and /search-engine-optimization.html are almost equivalent.

It's often helpful for web developers, users, and search engines to organize sections of the site within directories or subdomains. So a site with both forums and articles might have URLs that look like /forum/topic and /articles/title.

[edit] Page Titles

Every page's HTML <head> element should contain a descriptive <title> element. They should be concise and contain targeted keywords. The most relevant keywords should be early in the title. This also helps readers to understand the purpose of the page. For RSS feeds and social bookmarking a good title will also better describe a link to the page.

Example:

  • Bad: Dev Tips
  • Better: Web Developer Tips - SEO
  • Best: Search Engine Optimization for Web Developers

Again, do not stuff many keywords into the title. Keep it short and legible to humans. If search engines interpret a title as being built specifically for them and not for people it may be penalized in search results.

[edit] IMG ALT Attributes

Put appropriate keywords into the alt attribute of <img> tags. Along with helping associate keywords with the page the image is on, the image may appear in image searches for those keywords.

[edit] Link Related Pages

Pages that relate to each other within a site should be linked to each other. Not only will visitors stay longer as they find more relevant content, crawlers will notice the correlation. The links themselves should contain keywords.

[edit] Do Not Spam

Search engines attempt to return what humans want to find by analyzing what humans will see on a web site. Therefore if you optimize your site for people you'll naturally optimize it for web crawlers. Eventually each attempt to spam search engines are noticed and counteracted. Some sites, for example, stuff their web site content with repetitive keywords. Those are now usually ignored by search engines. Plus if spam attempts are significant some search engines may remove the site completely from their indexes.