Coding Your Way to SEO Success

Search engine optimization (SEO) has come a long way since the early days of the internet, becoming more of an art than a science, and requiring constant vigilance. The good news is that search engines have just as much of an interest as you do in ensuring that the results returned for a query are relevant and useful. To this end, search engines look for ways to identify high-quality sites to place at the top of their results page, and have begun to share those techniques – which involve working with the source code on web pages – with webmasters for mutual benefit.

So, as a designer or website builder, what are some ways that you can benefit from these SEO factors that search engines like Google and Bing have implemented? Let’s look at five options that you can integrate into your SEO strategies that will help you in your quest for SERP rank.

Rich Snippets

Google introduced rich snippets back in 2009 as a way to include more information about a web page’s content on the search engine results page (SERP). If qualifying types of content are tagged with the appropriate HTML tags, Google may show that information in a website’s entry on the SERP. Beyond the initial setup of the snippets, no extra effort is required of the SEO team, making them an incredibly powerful tool for relatively little effort.

The types of information currently supported by rich snippets are reviews, people, products, business listings, recipes, music, events and video content. Given this, it’s obvious that some types of businesses will benefit more from implementation of rich snippets than others. If you do fit one of these categories, taking the time to add the necessary code will almost certainly pay off in more traffic and clickthroughs.

Google is not the only search engine recognizing snippets – all of the major search engines are collaborating on standardizing the markup for rich snippets – see http://schema.org for more information on this. No need to learn a new language, as snippets use tags similar to the familiar HTML you are used to.

The process for integrating rich snippets consists of three basic steps. First, decide which markup format you will use (Microdata, Microformats, or RDFa); second, mark up the content; and third, test the markup to ensure the coding is correct. Google has a tool for testing markup where all you need do is enter the URL (http://www.google.com/webmasters/tools/richsnippets). Here’s a screenshot of a successful test for a snippet identifying the author of a piece of content, which includes the thumbnail photo of the author and links to more articles.

RichSnippetsTestResults

Authorship is a slightly different variety of rich snippet, as it relies upon the integration of a Google Plus profile, but other types of snippets do not. A movie snippet (see below) may include viewer ratings, links to other items on the website that searchers might be interested in, a cast list, or other items.

MovieRichSnippet

Even videos support rich snippet markup. In the example below, the addition of a thumbnail of the video, a longer description, a sense of how long the video is, and other details will most certainly result in more people choosing this site over a SERP entry that merely states “How to Replace or Install a Dishwasher.

VideoRichSnippet

A recent tool from Google – Data Highlighter – makes the process even easier. This tool can “teach” Google to recognize possible snippets on an ongoing basis, so that each time your site is crawled, available snippets will be automatically updated.

Canonical Tag

The canonical tag is a powerful SEO element that is simple in theory, but often misunderstood and misused. The purpose of adding the tag to a web page is to clarify which version of the page is the preferred one for ranking. Use of the tag alleviates duplicate content issues that may be plaguing your site and resulting in a loss of influence.

All three major search engines support the canonical tag, which is inserted into the <head> section of a web page. However, care must be taken in using this, particularly in large websites with many thousands of pages. In many cases, it is more prudent to use 301 directs to indicate and deal with duplicate content. An example of where the canonical tag can be particularly useful is for sites with numerous pages featuring the same product, but with different color choices. Use the canonical tag to tell the search engine which of those pages you would like to be considered as the most relevant (perhaps the one that has the most popular color choice) and thus ranked above the others.

This article has more about the canonical tag and whether or not it can help solidify your presence in the eyes of the search engines.

.htaccess File

The .htaccess file is a configuration file, generally placed in the website root, to handle configuration access, settings, and content control. There are literally hundreds of different things you can do with an .htaccess file to help maintain and control your website in terms of SEO.

Among these, 301 redirecting is one of the most useful, and in this way, an .htaccess file is often a better option than canonical tags. One important application is to let search engines know which homepage URL they should use in cases where both exist – for example – http://www.example.com and http://example.com. Without this direction, backlink juice will be split, severely affecting your place in the SERPs. In fact, 301 directs placed here can also deal with any number of duplicate content issues you may have throughout your site.

Another use for this an .htaccess file is to handle 404 (or missing) pages. With the simple addition of one line of code to the file, search engine spiders will know that a page is missing and what to do next. One other popular application is to block traffic or visitors arriving from certain sites or to block visitors from accessing specific directories on your site.

Ten of the most common .htaccess file snippets can be found in this article. If you are working with WordPress, Joomla or other CMS, you should be able to find a plugin or use internal dashboard settings to achieve similar results.

Site Load Time

Another factor that search engines take into account when ranking websites is the time it takes your site to load into the browser. People expect an almost instantaneous appearance of a web page once they click on a SERP, and consequently, search engines have added site load speed into their algorithms. This combination of presence in the ranking algorithms and visitor expectations makes optimizing your site’s load time essential.

Many ways exist to improve your site load time, but the first step is to find out how long the site does take to load and how that time may compare to others (especially your competitors). Google has a nice tool called PageSpeed Insights that not only tells you the load time of any URL, but also provides specific suggestions for improvement. Major culprits in slowing down site load time include cluttered code, unoptimized images, and CSS and JavaScript on the homepage.

XML Sitemaps

An XML sitemap is useful for ensuring that search engines discover every page on your website that you wish them to. Too often, some types of pages are not crawled by spiders, which can negatively affect their position in the SERPs. Rich AJAX pages and image-heavy pages may not be identified without a sitemap. A sitemap will eliminate this concern via a simple and easily created file. Sitemaps can also provide search engines with additional metadata on certain types of content, such as video, images, news, and mobile.

Sitemaps are particularly important and useful for new websites that have not yet accumulated a good collection of links. Since search bots follow links to find new content, if your site lacks a good link profile, a sitemap can alert the bots to its existence. Sitemaps are created using a specific protocol, available at Sitemap protocol, or you can submit a text file or RSS/Atom feed as a sitemap.

Bonus: JavaScript Based Dates

Every available space counts in your SERP entry, so you need to make the most of each and every one. One problem with many WordPress themes is that they display the publish date of a post, taking up valuable space in your SERP entry, yet providing no real information. You can tell Google to ignore the date (and free up space to include more relevant data) by changing the code inserting the date in certain theme files to use JavaScript instead of php. See this article for details

Conclusion

The above are just a few of the ways that a webmaster can use coding to improve the chances that their website pages will rank well in the SERPs. Most are neither difficult nor time-consuming to implement. With a few simple additions to your source code, you will not only rank higher, but you will increase clickthroughs to your site, as searchers are drawn to the visual and additional information that snippet use can bring.