SEO Content Top

Building a SEO CMS – Part 4

August 25, 2009

Filed under: Building SEO CMS — Tags: , , — Nathan @ 9:32 pm

In the latest part of the series, I am going to explain one of the technologies we will use to build the SEO CMS. In this article I am going to be providing you with a sample .htaccess below, as well as explain what is it will do.

Firstly I am going to explain what a .htaccess file is. A .htaccess file is a configuration override file which has recursive properties, with those overrides being overridden with a .htaccess file in a subfolder of the main .htaccess file. Don’t worry if you do not understand this as you will learn these facts over time, or alternatively you can contact us to help you with any .htaccess issues you may be having.

Sample configuration:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^example.com
rewriterule (.*) http://www.example.com/$1 [R=301,L]

RewriteRule ^([A-Za-z0-9-]+)/$ index.php?page=$1
RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+).html$ index.php?page=$1

So what are those 5 lines which are key to your website actually doing? Well I am going to be splitting this down into two sections, the first two lines and the second set of two lines.

Line 1:

RewriteEngine On. This enables the apache mod_rewrite option which allows us to send a URL to apache, and have apache process the data and come out with what would be the real URL which would be expected.

Canonicalization fix
The First two lines are a fix for the common URL canonicalisation problem of http://example.com not redirecting correctly. This line is effectively pushing all traffic which maches the domain to the www. version, whilst employing the correct 301 redirect.

Mod_rewrite

The next two lines are the bit that ensures you do not have to output a querystring. what they are doing is allowing your web browser to input a URL in the format http://www.example.com/reddwarf/ and translate it into http://www.example.com/index.php?page=reddwarf. With this input you now have the control to check for database rows which correspond to this and provide all of hte data as you would normally expect.

Building a SEO CMS- Part 3

August 16, 2009

Filed under: Building SEO CMS — Tags: , , , , , — Nathan @ 9:42 pm

Choosing a hosting platform is a key decision when you are building a system from a SEO perspective. A lot of our clients like to use .com top level domains whilst wanting to appear on Google UK listings. As we have mentioned on many previous blog posts this can be overcome by using a UK based web host provider, such as NH-Hosting.

At the same time we also have the problem of building a website from the ground up, and as such choosing the correct hosting platform can provide you with a great foundation, and the incorrect one a huge disadvantage.This is why I am going to explain my decision to use the LAMP package (Linux, Apache, MySQL, PHP) to build the site upon.

Linux – Linux is a extremely stable and secure operating system which isolates every users file permissions, as per any other Unix platform. In reality it does not matter what the platform is in terms of search engine optimisation, but security must be a major consideration and whilst the Microsoft platforms are becoming even more secure with each new patch, the fact remains Unix platforms have a tendency to have bugs / security flaws found and patched even quicker.

Apache – According to recent statistics, Apache hosts 47.12% of websites on the internet, and this is not by coincidence. This is down to the fact Apache is a extremely reliable, customisable and cost effective platform to host your website on. A couple of the modules we will be working with in this article require apache on the web server to allow us to work with the website.

MySQL – This is another of the obvious choices, however it is more due to the ease with which it will connect to a PHP web server and reliably store the data.

PHP – This is the last decision, it is a programming language which has modules that work extremely efficiently with all of the other modules, and allows us a number of extremely useful functions which will make the building of this SEO CMS easier to build.

Building a SEO CMS- Part 2

August 9, 2009

Filed under: Building SEO CMS — Tags: , — Nathan @ 7:13 pm

Today is the first installment in the practical side of building your SEO CMS, rather than simply trying to explain what we are going to be building. As with any construction you are looking to build the foundations first, and then move on towards the heights of search engine rankings.

In this article I am going to be discussing database design, and will give you some SQL which you can run at your own risk.

Database design is one of the key areas of your website, to put it simply it is the foundation of your website. Throughout this article we will be making small modifications to the SQL structure to cover the designs. However what do you want from the database?

  1. Reliability – The last thing any website owner will want is for their website to be unavailable to the end user. And especially from a SEO perspective if the website is unavailable due to the database being poorly designed.
  2. Speed – Another key thing you want to avoid is long complex queries. If you look at the design of your website properly, all data should come together in the minimum number of queries, as well as the minimum memory hungry joins. And also consider the fact the last thing you want is for a ceartesian product join in any database query you design
  3. Ease of access – I am quite familiar that a number of you out there will not have worked in any arena’s where complex SQL queries would be used, and therefore it should always be clear to you how the query works.

Also looking at the requirements you have many options with regards to your database design, do you split your pages and categories into two tables? do you then also put all of the header information into a third table due to normalisation of potentially repeated data, However purely to keep this guide workable for even the most novice of web developers, we will keep all of the data in one table.

Therefore if we are using a PHP / MySQL structure (There will be more on why in a later article) you would be looking at requiring the following information:

  • PageID: This is a unique reference for each page you can use internally within your system.
  • Title: This is to store the page title in
  • MetaKeywords: This is to store the page Keywords in
  • MetaDescriotion: This is to store the page description in
  • Content: This will store the content of the page (this is what makes page a different from page b)
  • Filename: Just as if you was creating the page from scratch in frontpage, each file needs a name
  • link anchor: This will allow you to customise the anchor text which links to a specific page.

And for your pleasure, here is the DDL which will create a basic table.

CREATE TABLE `pages` (
  `PageID` int(10) unsigned NOT NULL auto_increment,
  `Title` varchar(255) NOT NULL,
  `MetaKeywords` varchar(255) NOT NULL,
  `MetaDescription` varchar(255) NOT NULL,
  `Content` longtext NOT NULL,
  `Filename` varchar(255) NOT NULL,
  `LinkAnchor` varchar(255) NOT NULL,
  PRIMARY KEY  (`PageID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Older Posts »
SEO Content Footer