John Cheesman

On-site SEO


A project I took on to optimise a friend's website, which I used as a case study on my course.

Re-posted from my old coursework blog. Originally posted on 16th March 2012.

Search Engine optimisation is the practice of improving a website’s performance in search engine listings with the aim of driving more traffic to the site. On-site SEO encompasses all of the internal changes that can be made to a website to increase its page rank and performance in relation to targeted keywords.

Recently I have been redesigning a website that has been struggling with its performance in search engines in comparison to its competitors. Pregnancy Preparation is a local business running evening classes for pregnant women in Derby. I will refer to this project in my examples, detailing the steps I have taken to hopefully improve the site’s page rank (currently 0) and help it match relevant search queries.

Keyword Development

Before considering how to optimise a website it is vital to have a list of keywords that you are trying to target. There are many online tools to help identify relevant keywords and phrases, such as the Google Keyword Planner, which can help by providing statistics and suggesting related search terms.

To filter the results of your own ideas and suggestions that have come out of a keyword tool, keywords should be categorised as either primary, secondary or tertiary. In general it is preferable to target the keywords with a high search volume and low level of competition although other considerations, such as locality or industry, may lead to the selection of more specific terms with lower volumes.

The primary key-phrase identified by the client for Pregnancy Preparation was ‘pregnancy yoga derby’, which she felt was the most likely combination of keywords her potential customers would use. Currently her site is listed at the bottom of page 2 on Google for this query and is preceded by many of her competitors as well as many less specific results.

Keyword search results for Pregnancy Preparation

Keyword Competition Global Monthly Searches Local Monthly Searches
pregnancy Low 30,400,000 4,090,000
pregnant Low 24,900,000 3,350,000
yoga Low 20,400,000 1,000,000
yoga class Medium 368,000 49,500
yoga course Medium 201,000 33,100
yoga pregnancy Medium 74,000 22,200
pregnancy yoga Medium 74,000 22,200
pregnancy preparation Low 12,100 1,300
yoga derby Medium 1,600 720
yoga inspired Low 4,400 210
yoga-inspired Low 4,400 210
pregnancy yoga derby Medium 58 58
pregnant derby - - -
pregnancy derby - - -

Keyword Density

As search engine algorithms have become more sophisticated, the volume of keywords in page content has become less of a factor in page ranking. However, it is still important to consider keywords when writing content to ensure that it will be seen as relevant to the website and will match the other contextual indicators used in categorising your website. The optimal keyword density is 4-5%, any more than this could be considered keyword stuffing and result in a penalty. There are various online tools that can help identify the prevalence of keywords across a website, for example the SEO Book Keyword Density Analyzer. This crawls your site and ranks keywords and phrases by percentage, giving an insight into how well the content reflects the keyword strategy.


Word Count Density
class 11 4.33%
exercise 10 3.94%
birth 9 3.54%
yoga 9 3.54%
classes 8 3.15%
inspired 7 2.76%
pregnancy 6 2.36%
exercises 6 2.36%
able 5 1.97%
mothers 5 1.97%
position 5 1.97%
relax 5 1.97%
time 5 1.97%
derby 5 1.97%
labour 4 1.57%
breathing 4 1.57%

Two Word Phrases

Phrase Count Density
yoga inspired 7 2.76%
inspired exercise 5 1.97%
pregnancy preparation 3 1.18%
exercise class 3 1.18%
breathing exercise 2 0.79%
topic time 2 0.79%
bespoke yoga 2 0.79%
mothers to 2 0.79%
preparation yoga 2 0.79%
please contact 2 0.79%
position labour 2 0.79%
expectant mothers 2 0.79%
gentle exercises 2 0.79%
classes derby 2 0.79%
pregnancy birth 2 0.79%
pregnant women 2 0.79%

This breakdown for Pregnancy Prepararation identifies ‘Class’ as the most common word. Whilst this may need to be addressed in terms of reducing occurrences of non-key words and phrases, many of the terms the client wishes to target are occurring naturally.

Page Title

The title tag is perhaps the most important element for telling people and search engines about the content of a page. It is commonly used by search engines as the heading for a search listing and is the first thing a user will read when scanning through a page of results. Page titles should:

The first word in the title should be a relevant primary keyword, followed by a secondary keyword or phrase that gives more specific information about the page contents. This will create a headline that is both informative and attractive to users and search engines, improving page rank and providing a match for the user’s search criteria. In the case of the yoga class website the following title was being used on every page:

<title>Pregnancy Preparation - Yoga-inspired exercise classes in the Derby area</title>

I changed this to prioritise the primary key phrase identified earlier, followed by a more detailed overview of the business making use of secondary keywords. I made the simple addition of the URL suffix for each of the subsequent files to identify the different pages and clarify the structure of the site:

<title>Pregnancy Yoga Derby | Yoga-inspired pregnancy preparation classes | About</title>

Meta Description Tag

The contents of the meta description tag is often used by search engines for the text that appears between listing titles and should be used as a way of presenting what is on offer to the user. Although descriptions are important for increasing click-through rates they are no longer a ranking factor, certainly for Google, and should be used as ad copy to match search terms and encourage interest. Description tags should:

The existing meta tag on the Pregnancy Preparation homepage is passable, making use of some important keywords and clearly describing the nature of the content. However, there is no CTA and the same description has been used for every page.

<meta name="description" content="Pregnancy Preparation, organised by Berenice Sewell and Rebecca Cumming, provides bespoke Yoga-inspired exercise classes to pregnant women in the derby region" />

To improve this I have simply added the CTA for the homepage and then written variations for the other pages that are specific to each of their purposes:

<meta name="description" content="Pregnancy Preparation, organised by Berenice Sewell and Rebecca Cumming, provides bespoke yoga-inspired exercise classes to pregnant women in Derby. Call now to book your place." />
<meta name="description" content="Our Derby based pregnancy yoga courses take place at three locations in Mickleover and Little Eaton, come to the one that is most convenient for you." />


Headings should be used to give structure to the content and make it easier for users to find the information they are looking for. Whilst not as important for SEO purposes as the title tag, the h1 can still contain the primary keyword providing it can be worked in naturally and clearly describes the content. You should limit yourself to one top-level heading per page. Subheadings (h2 and h3) can provide more specific information and should contain secondary keywords where possible.

<h1>Yoga-inspired gentle exercises, breathing and positions for birth. Relax, Stretch &amp; Breathe</h1>

The original h1 for the homepage works well, clearly stating the nature of the business and managing to make sensible use of keywords. However, as with the title and meta description, it was duplicated on every page of the site. I have written unique top-level headings for each page that use relevant keywords to clarify the purpose of the content and encourage users to continue reading. For example, for the ‘benefits’ page:

<h1>How our yoga-inspired classes can help you and your baby</h1>

As the site doesn’t contain any large sections of copy, sub-headings (h2) have been used to label and divide content and as a result naturally contain relevant keywords.

Internal links should be used within copy to connect users to other relevant areas of the site as well as in the main navigation. They should be displayed using descriptive text and keywords where appropriate to make the destination explicit to the user. This can also help search engines by giving them an idea of the relevance of a destination in relation to the current page.

The first line of body copy on Pregnancy Preparation includes two of the locations of the yoga classes. Changing ‘Mickleover’ and ‘Little Eaton’ to links to their respective headings on the ‘courses’ page creates a short cut for users to key information whilst maintaining readability and keyword levels:

<p>Welcome to Berenice and Rebecca's website, we provide bespoke yoga-inspired exercise classes to expectant mothers with classes in Derby, <a href="courses/index.php#mick">Mickleover</a> and <a href="courses/index.php#little">Little Eaton</a>.</p>

As with internal links, external links should make use of keywords where appropriate and be descriptive about the destination. It is important to only link to reputable, authoritative websites that will not have a negative impact on your page rank. If an external source isn’t trusted, use the ‘nofollow’ attribute to prevent robots from making an association with the other website. It is also a good idea to regularly check the validity of links which may have been broken due to content being removed or changed on external sites. The W3C Link Checker is an online tool that checks all links on a domain and provides feedback about errors.


Images are an important aspect of SEO, with image searches providing an alternative path to your website. Images should:

It is important to note when writing an alt attribute that it primarily functions as a description of the image so only use keywords that will serve this purpose. There may also be instances when optimising certain files, such as background or decorative images, wouldn’t be appropriate as they don’t necessarily relate to the content of the page.

The carousel on the Pregnancy Preparation homepage contains four similar images that were previously marked up as:

<li><img src="images/yoga1.jpg" width="380" height="289" alt="1" /></li>

These have been changed to include more descriptive, keyword rich file names and alt attributes:

<li><img src="images/pregnancy-yoga-class-1.jpg" width="380" height="289" alt="expectant mums practicing pregnancy yoga 1" /></li>


Good quality, unique content is one of the most important factors in improving a website’s ranking. Search engines favour regularly updated content that is considered authoritative and is relevant to the subject of the website. As discussed earlier, it is important to use keywords in copy in context, considering readability and the usefulness of the information. It is advisable to include primary and secondary keywords in the first paragraph of each page as this may be used instead of the meta description when your site is displayed in a search query. There is also the option to highlight words or phrases within copy that are of particular significance as this will aid users in scanning the page to find what they are looking for. This should be used sparingly as overdoing it could ultimately reduce readability. For Pregnancy Preparation the client wanted two key terms that were unique to the business to be highlighted:

run in an <span class="accent">Active Birth</span> format

Other Factors

In general it is helpful to write good quality, valid code as this makes it easier for robots to crawl a website and reduces the chance of errors that might prevent it from being indexed. All text that is visible on-screen should be present in the markup, even if images are being used to replace headings. In the case of the yoga site, the whole branding section was a single image with no actual text present in the code:

<img src="images/head.png" alt="main banner image" width="1055" height="225" />

This was simply replaced by appropriately marked-up text, providing a stable heading for the site and creating another legitimate opportunity to use keywords:

<p><a href="index.php">Yoga-inspired exercises for Pregnancy</a></p>
<p>relax, stretch &amp; breathe</p>

Another problem that can prevent efficient listing of a website is canonicalisation. As most browsers no longer require ‘www.’ in URLs it is possible that search engines can index two versions of the same website which may appear to be duplicated content and could have a negative effect on ranking. The same applies for websites with multiple top level domains (e.g. .com,, .net). To avoid this it is important to redirect all variations of the URL to a single address. This is achieved by writing a 301 redirect (indicating a permanent change to search engines) in the .htaccess file. For Pregnancy Preparation I rewrote non-www. to www. using:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.pregnancypreparation\$ [NC]
RewriteRule ^(.*)$$1 [L,R=301]

If you are using Google Webmaster Tools to manage a website it is possible to consolidate you URLs to ensure only one version of the site is indexed, however you will still need to upload a .htaccess file to setup the redirections. Other optional files include ‘sitemap.xml’ and ‘robots.txt’, both of which should be stored in the web-root. Sitemap.xml is a list of every page on the website with optional declarations for the frequency of updates and a relative score for importance. This file helps search engine bots to crawl your site and ensures that all of the pages are indexed. Robots.txt can be used to block certain robots and restrict access to particular pages. This can useful if there are files on the server that do not need to be indexed (e.g. include files). Even if you don’t need to limit access to robots it is still advisable to provide a robots.txt file as without it a 404 error will be logged every time the site is crawled.