Not only is the code of a website the most controllable aspect of search engine optimization (SEO), code-side optimization also makes up the majority of SEO-related tasks. From site architecture to semantic page structure to the handling of dynamic content, much of what a developer does can and should be optimized for the highest possible search engine rankings, traffic and conversions.
With that in mind, here is a helpful checklist of SEO best practices to consider while developing or managing a website.
Site Architecture
The founders of Google believed that the perfect website was one organized like a doctoral dissertation, including a clearly defined table of contents and chapters that reinforce the overall theme. A clear and logical directory structure is important for any site, both to help users navigate and to help search engines understand the site. A site's themes should be conveyed through an organized URL directory structure, with each additional subdirectory approaching the theme from a more granular perspective.
Semantic Page Structure
Pages of a site should be structured in a hierarchical manner, with appropriate headings, emphasis and meta information. Every page's title tag should be a unique summary of the content on that page. It should also include a keyword phrase targeted for search engine ranking, especially if it is a landing page. Heading tags should be used to indicate topic sections, like the headline of a newspaper. Emphasis should be added to words or phrases to indicate very important content. The search engines pay attention to semantic markup on a page, so webmasters and developers should use that to their advantage.
Spiderable Content and Handling Dynamic Content
Before a search engine can index a website for users to find, a site has to be spider friendly. A developer must balance user experience with search engine spiderability. Flash and other dynamic content should be used thoughtfully as search engines are oftentimes not yet able to understand these files completely. The content that is most friendly to search engines is simple text. A site with poor crawlability will have difficulty ranking in search results. Always consider whether or not a search engine will be able to access and read the code.
Internal Link Architecture
The way a site's internal links are organized affects the flow of link popularity throughout the site and signals the relative importance of various pages on the site. Links are a search engine's interface to the site and link architecture can be designed to imply the hierarchy of site content. Pages linked to in the top-level navigation, in the footer and other high-level locations are seen by engines and users as significant to the organization of the site. All internal links throughout the site should be fully qualified rather than relative to avoid any possible confusion by search engines. The anchor text used in links is weighted heavily by search engines when determining the topics relevant to a page.
Speed and Weight
Every page on a site should be as fast and light as possible for optimal search engine crawlability and rankings. Excessive embedded JavaScript or CSS in a page's code can be an obstacle to search engine crawlability. Excessive code can also dilute keyword-rich text content so that important keywords and content are devalued by the search engine. The further down the keyword-rich text content is within the code, the less important it may be considered by search engines. As an SEO rule of thumb, externalize JavaScript and CSS as much as possible.
Robots.txt
A site's robots.txt file contains specific instructions to search engines for how to crawl a site. Through the robots.txt file a webmaster can direct a search engine spider, as well as other bots, not to crawl or index pages or directories of a site. If the intent is to have the entire site crawled, an empty robots.txt file should still be present on any site.
Site Maps and XML Sitemaps
There are two types of site maps. An HTML site map lists all the pages of a site in order to help users find the page or information they are looking for. An XML site map is a file that lists the pages of a site for use by a search engine. Create and submit an XML site map to the major search engines so that the search engine may find URLs not discovered in the normal crawling process.
Conclusion
When designing and managing a website, a web developer should consider the search engines as well as human users. A site optimized for search visibility will only help people to find and use the site. The guidelines above are a good starting place for a developer who understands that basic SEO is required for success on the web today.
