Edmonds Commerce : Web Development, Design, SEO

Archive for the 'search engine optimisation' Category

PHP 301 Redirect Function with Headers Check and Javascript Fallback

Thursday, May 22nd, 2008

If you are changing your URL structure, for example when moving to a search engine friendly URLs system, you need to be able to let Google and all the other search engines that the page has moved to the new URL. You really don't want to display the same content on two URLs

So to achieve this we can do what is called a 301 redirect. This is a special redirect message which basically says "has permanently moved to". By doing this, all of the search engine power, rank or whatever you want to call it will be directly transferred to the new URL.

However

Sometimes your script might spit out the headers earlier than you expect. If this happens then your site will fail completely to load with a fatal error along the lines of

warning: Cannot modify header information - headers already sent by (output started at ....

We really don't want this to happen, so what we can do is wrap the redirection in a headers_sent check and then fall back to a javascript redirect if headers have been sent for some reason. This is belt and braces logic.

Note script tags need spaces removing

PHP:
  1. function requrl_check($correct_url, $delay=3){
  2.     $request_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
  3.     if($request_url != $correct_url){
  4.         if(!headers_sent()){ //going to assume that headers are not sent
  5.         header("HTTP/1.1 301 Moved Permanently");
  6.           header('location: ' . $correct_url . '');
  7.           exit();
  8.        }else{
  9.           echo "<h3>The Page $request_url has Moved</h3>
  10.          <a href=$correct_url>$correct_url</a>";
  11.           echo '<h3>Now Refreshing in ' . $delay . ' Seconds</h3>Refreshing to:<br>' . $correct_url . '<s c r i p t type="text/JavaScript"><!--
  12.         setTimeout("location.href = \'' . $correct_url . '\';",' . ($delay * 1000) . ');
  13.         --> </s c r i p t>';
  14.             exit();
  15.         }
  16.     }
  17. }

tidy :-)

Further Reading:
www.stuntdubl.com
www.intertwingly.ne
webgasm.actiononline.biz
www.techcounter.com
www.chiropractichomepage.com
123howtoguide.com
searchblog.tamar.com

Meta Title Tag and SEO

Tuesday, April 8th, 2008

There are some very complicated aspects to a successful on page search engine optimisation strategy. However there are also some incredibly simple ones.

At the very top of the list of simple things you can do to improve your SEO is to make sure that your <title> tag contains a unique and descriptive page title for each and every page of your web site.

If you have a smaller site with not too many pages then you can handle this by hand. On the other hand, if you have an ecommerce store for example with hundreds or thousands of products and categories then it is going to be easier to build in some kind of dynamic title functionality.

Edmonds Commerce have helped out numerous web masters by implementing a bespoke and automatic dynamic meta tag system which creates a highly optimised title for each and every page.

If you would like us to help you out, simply get in touch.

Online Backend System

Monday, March 10th, 2008

What could be more convenient than having all of your business systems integrated into one online package. No more hassles moving information from online to offline systems. No more out of date or vague information regarding stock figures or supplier invoices.

For an online business with a well specified and rigorously backed up dedicated server, it makes a lot of sense to move away from applications that run on the desktop to applications that run on the server. For your employees to interact with your business systems, they only need a broadband internet connection and a web browser. This in turn opens up the possiblity of moving away from costly and insecure windows desktops to a more robust and cheaper to run Ubuntu Linux desktop. Preloaded with firefox web browser and the open office suite of office applications, Ubuntu is an excellent choice for a business desktop.

If you want to increase productivity whilst simultaneously slashing operating costs, get in touch with Edmonds Commerce today to find out how a bespoke online business system can improve your business.

Apache, mod_rewrite and SEO

Tuesday, March 4th, 2008

Dynamic database driven web sites tend to use various GET variables to define which content to display on that particular page. This is perfectly normal and reasonable. However it does make things a little confusing for search engine spiders as not every GET variable pertains to alternative content. Often GET is used for session, or maybe referrer tracking - or pretty much any piece of information which your web site may use.

This can mean that your product page about fluffy banana shaped teddy bears has the address

CODE:
  1. mysite.com/index.php?cat=123&amp;product=333&amp;breadcrumb=123_43_2&amp;session_id=89o7324kjhlef8y234h

Not only does this make life difficult for search engine spiders, but its not exactly the most memorable url for your visitors either.

There is a solution and its called mod_rewrite.

Apache is part of the LAMP stack which is one of the most popular software and operating system combinations used to power web servers. Mod_rewrite is a particular plugin for Apache which allows you to create rules which will rewrite urls when they meet specific criteria.

The only really tricky part about setting up rewrite rules is that by neccessity they rely on regular expressions. Regular expressions can seem like a dark art at first, and often even for a seasoned coder familiar with a bit of regex, decoding someone elses expression can take a bit of brain power to say the least!

However there is no real reason to worry as all you really need to do is to learn how to achieve what you want. You do not need to learn the ins and outs of every particular regex function or operator.

For example take this

CODE:
  1. RewriteEngine On
  2.  
  3. RewriteRule ^(.*)\.p(.*).html$ product.php?products_id=$2&amp;%{QUERY_STRING} [L]

This rewrite rule will take a url in the form of:
mysite.com/whatever-you-want-here.p.[products_id].html

And automatically convert it so that to your web system it is the url:
mysite.com/product.php?products_id=[products_id]

All you need to do now is devise a nice way of dynamically generating all of those nice keyword rich urls for your product pages and you are in business.

If you want any help enabling the power of mod_rewrite to give your web site properly search engine friendly URLS, get in touch today.

Related Blogs
http://www.crazyleafdesign.com/blog/check-if-mod_rewrite-is-activated-on-your-server/
http://www.jtpratt.com/2008/01/22/how-to-fix-htaccess-file-for-mod_rewrite-and-addhandler-on-godaddy-subdomain/
http://pensae.com/2008/01/14/when-mod_rewrite-doesnt-work/
http://www.logon2.com.au/blog/archive/web-design/php-apache-mod-rewrite-tutorial/
http://blogs.ittoolbox.com/c/codesharp/archives/when-bugs-become-features-22068
http://geniustechblog.com/htaccess-mod_rewrite-tutorials-developer-tools/
http://jeremyhermanns.org/2006/09/30/learning-to-use-mod_rewrite/

osCommerce Essential Modifications

Thursday, February 21st, 2008

osCommerce is an awesome ecommerce package. It has many critics and this is mainly due to the fact that unlike many modern open source packages it is not really ready to run "out of the box". That is a drawback, however it is not really so much of a drawback when you take into account that anyone that would want to establish an ecommerce presence is going to be very keen to modify the package to make the site look and feel unique.

This is where osCommerce really shines as it is very easy to modify and there is a huge user base with literally thousands of plugin modifications or "contributions" in osCommerce speak which can help you to make your store work in exactly the way you want.

There are some things though that are highly recommened for every osCommerce store though:

1. Search Engine Optimisation

As standard, osCommerce really is not very search engine friendly. Search engine friendliness is the first step towards search engine optimisation. This of course means that there are a fair few things you need to do to your store to make it truly search engine optimised. However, they are worth the hassle (especially if you get us to do it for you) and once you have some SEO modifications implemented, you will be able to start to get indexed and gaining visitors from the search engines without having to pay per click.

2. Speed

There are a few key things that every store should really do to speed up osCommerce. If however you expect your store to have a lot of visitors and/or display a lot of products and categories then you will really benefit from giving the front end of the site a bit of an overhaul in certain areas. The speed improvements possible are really quite dramatic and can make the difference between your visitors sailing through the site straight to the page or product they want or them getting bogged down, bored and finally leaving before they even get where they want to be.

3. Security

osCommerce is pretty secure out of the box. The admin side obviously needs some password protection and can be made more secure if it is felt neccessary. An easy modification is to simply rename the admin folder into something that only you know.

4. User Friendly

The osCommerce ecommerce system is fairly user friendly from the outset. One area that many people prefer to modify though is the checkout procedure which can be a bit long winded for some.

5. Easy Administration

Admin side there is a whole host of things that you can do to make your and your employees' lives easier. For example adding products one by one using the admin tool can be a bit tedious and slow. Easypopulate is an awesome addition to any osCommerce store allowing easy population and editing of the product catalogue using your favourite spreadsheet program. We like Open Office for this task.

Part of the joy of running your own web site is that you are free to edit, change, personalise and improve it to your hearts content. Some things you will add because they make a real difference to your bottom line and some things you will add just because you think its a good idea or will be cool. The great thing with osCommerce is that you can edit it and make it work the way you want.

If you are not confident with PHP or the change you want to make is a bit more complex than you can handle, then we are more than happy to get in there and give you a hand!

SEO, Links, Pagrank and Anchor Text

Tuesday, February 19th, 2008

One of the most important aspects of a successful SEO campaign is the building of links from external web sites that point to your web site. However it is not as simple as that. There are good links and bad links. If it was as simple as building the most amount of links possible then it would be very easy for those of us with a little bit of know how to completely dominate the search engine results pages.

No these days you need to build quality inbound links that are from reputable web pages. The links must not have the rel="nofollow" attribute as if they do they will effectively be worthless to you in terms of SEO. The no follow attribute was brought in to try and combat the explosion of blog comment spam. The idea being that if blogs are set up to automatically nofollow all links posted in comments then the spammer might give up.

What Makes a Good Link? 

A good link will firstly be from a page that is relevant to the page that you are trying to promote. So lets say for example you are trying to build links to your category page where you display your range of rabbit hutches and other rabbit related paraphenalia, then ideally you want to be building links on other web pages that are also rabbit related.

You might decide to take Google's toolbar pagerank into consideration when you are looking for inbound links. Whilst this is by no means a reliable indicator of the value of a link, it does give you some indication and I think it would be fair to say that a link from a page with a pagerank of 4 or more is much better than a link with no pagerank.

The other major factor that you need to take into consideration is the anchor text of the link that you place. The anchor text is the visible text that people can actually click on to visit your page. To promote your rabbit products page, you really want to try to get the word rabbit in there. So for example <a href="mysite.com/rabbit-page.html">Buy Rabbit Stuff</a> is much better than <a href="mysite.com/rabbit-page.html">click here</a>.

Where to Build Links?

This is the big question and unfortunatley there are no easy answers. Various link building oppportunities tend to crop up, be over exploited and then become generally worthless, or much reduced in value. Where to build links really depends on the context that you are trying to build links for.

If you would like to hire Edmonds Commerce for some link building services or consultation - drop us a line!

Essential Search Engine Optimisation Research Tool

Saturday, February 16th, 2008

A large part of an effective SEO campaign involves researching the current top ranking sites for your chosen key words or phrases and then trying to figure out what they are doing to get there. This can be a painstaking and laborious task. However there is one great tool which is highly recommended to give you a quick insight into the SEO factors contributing to a particular web sites ranking.

SEO for Firefox is an addon for firefox which does a few things. Firstly it can give you information displayed directly onto the search engine results pages. However this can seriously slow down your browsing experience depending on how many bits of SEO info you want to be displayed automatically, how many results you view in one page and of course how fast your internet connection and PC are.

Another neat feature of the SEO for firefox plugin is that it highlights any nofollow links on whichever page you are looking at in red. This is a useful feature which means you don't have to read through source code to check for the nofollow attribute.

The final great feature is built into the right click menu. This allows you to open up a full report of whichever page you are looking at in a new window. I find this feature the most useful on a day to day basis as it is non invasive, but allows you to easily get the information you want on demand.

Definitely worth installing and playing around with, though by no means a substitute for proper investigation, the SEO for Firefox addon is a must for any web master or online marketing professional.

Advanced Google Search Queries

Monday, February 11th, 2008

Google is undoubtably the world's most well known and widely used search engine. However I doubt that a large proportion of Google users really understand the power of Google search and the various ways it can be used to track down very specific information and resources.

Here is my breakdown of the most useful advanced search operators to be used in Google:

Phrases:

Instead of just searching for keywords, it is often much more useful to group keywords into phrases. This is very easy to do, simply wrap your chosen phrase in "speech marks". By doing so you will only pull pages which display the entire keyphrase as it is, instead of pages which display all of the keywords, but not necessarily as a phrase.

See the results of these two searches:

edmonds commerce Bulk Catalogue Handling or edmonds commerce "Bulk Catalogue Handling"

Site:

You can limit your search to pages within a certain web site. This can be great for finding things, but as a web master it is also useful for seeing how many of your pages are being spidered and indexed by Google.

e.g. site:www.edmondscommerce.co.uk shows all of the pages that are indexed by google under the edmonds commerce domain name.

InURL:

The inurl: operator searches for the term in the URL of the site. This is good for finding specific sections of a web site. So for example I can see how many of the Edmonds Commerce Blog pages are indexed by mixing up the site: operator and also using the inurl: operator to only pull pages that have the blog/ sub folder in the URL.

e.g. site:www.edmondscommerce.co.uk inurl:blog
InTitle:

Like the inurl: operator, the intitle: operator looks for the keyword in a specific place, this in in the <title> tag of the page. The title tag is what is usually displayed as the link text in Google search results pages.

So another way of finding all of my indexed blog posts is to search for the word Blog in the title

eg. site:www.edmondscommerce.co.uk intitle:blog

The Minus Operator:

A very powerful operator, the - minus sign allows us to show results that do not match the following. So if we want to find pages from the Edmonds Commerce domain that do not have the words "web design" on the page, we can do the following search:

e.g. site:www.edmondscommerce.co.uk -"web design"

Conclusion

Google is a great search engine and it is definitely worth playing around with your searches to get the best results. Also, as a web master you should really be doing everything you can to figure out how the big G works so that you can ensure you are doing everything in your power to get your site to the top of the results.

Related Blogs:
Hybrid SEM: The ultimate guide to advanced searching

Putrefy: Google Advance Search

Seo Smarty: Advanced Search Commands

10 SEO Myths

Monday, February 4th, 2008

The world of search engine optimisation or SEO for short is confusing to say the least. The main problem is that much of SEO knowledge is like a kind of religion. You can never truly know how the Google algorithm works at any one time. You can read up on forums and blogs and maybe do your own experiments to try to get an understanding, but at any one time a lot of what you know about SEO is based on faith.

The other really confusing thing about SEO is that we are always being told different stories. If you are not careful you may be reading blog posts for forums that are from the early years of 2000. By now these posts or comments are generally out of date and not applicable to current day SEO.

So to try to clear things up a bit, here is a list of the 10 most common SEO Myths that you will encounter when trying to figure out how to get thousands of visitors per day from natural search results.

  • 1. As Many Links as Possible is the Answer
  • 2. Reciprocal Linking is the Answer
  • 3. Paying Someone for Guaranteed First Place Positions is the Answer
  • 4. Directory Submission is the Answer
  • 5. Keywords Everywhere is the Answer
  • 6. Paid Links are the Answer
  • 7. Do No Evil is the Answer
  • 8. Pay Per Click is the Answer
  • 9. Time is the Answer
  • 10. Money is the Answer

Here is a breakdown of this list.

1. As Many Links as Possible is the Answer

From reading about SEO you may get the impression that links are one of the most important aspects of promoting a web site in the search engines. Whilst this is true, it does not follow that the more the better. In fact there are scenarios where you can easily have too many links. Furthermore there are scenarios where certain links can actually work against you.

2. Reciprocal Linking is the Answer

A reciprocal link is simply enough an "I'll link to you if you link to me" scenario. There was a time when reciprocal linking was one of the main white hat SEO techniques. However the latest information from Google is that reciprocal links are being devalued. Reciprocal Links that are worth having are hard to come by and whilst I would not advise you to abandon any form of reciprocal linking, pouring hours and hours into it is most likely a waste of time.

3. Paying Someone for Guaranteed First Place Positions is the Answer

You might get the impression that being in the top of the first page results is all important to getting the most traffic to visit your site. It is true that the vast majority of people do not stray much beyond the first three results presented in the search engine results page. However there is a big difference between ranking number one for a search term that a lot of people are using, and ranking number one for a search term that no one is using.

4. Directory Submission is the Answer

One commonly supported way to build inbound links to your site is to submit it to a long list of directories. This is another technique that used to work well but has since dwindled to the point that it is hardly worth your time. There was a time when directory sites were actually a reasonable source of traffic but this day has long gone. Furthermore, the vast majority of directories these days are cookie cutter sites with little value and highly unlikely to enjoy any visitors other than those people who are still looking to submit to directories.

5. Keywords Everywhere is the Answer

You may get the impression that to rank for your chosen search term, you simply need to repeat that search term as many times as possible in as many places as possible on your page. This is referred to as keyword stuffing and is very much looked down upon by the search engines. In fact it is entirely possible to rank for a search term which does not exist on your page even once. I do not recommend that you test this theory out just yet, but conversely do not be tempted to put your search term on the page any more than is natural for that page.

6. Paid Links are the Answer

After reading about all the ways that people used to build links being closed up by the search engines, or being so labour intensive to be not worth the effort, many people looked towards simply paying a web site a monthly fee to display a link. This has worked well in the past but the search engines quickly became concerned about their algorithms being manipulated with sheer cash. The search engines now go to a lot of effort to devalue or even penalise sites that use paid links. This means that even if you can afford to pay the often huge monthly bills for links, you stand a good chance of gaining at best nothing and at worst a penalisation for your trouble.

7. Do No Evil is the Answer

Google famously stated as its mission statement that they intended to Do No Evil. So you might think that if you play exactly by the rules laid down by Google then the big G will reward you for your steadfast commitment to SEO as Google permits you with high rankings. Unfortunately this is not usually the case and in fact the people who are ranking at the top for competitive search terms are using one or more techniques that cross over into the slightly murkier side of search engine optimisation.

8. Pay Per Click is the Answer

Pay Per Click is the term used to describe the Google Adwords style of search engine marketing. This simply enough means that you set a price you are willing to pay and if you set a high enough price to beat your competitors, your advert will be placed on the search engine results page. Instant gratification! However a badly managed PPC campaign can literally break the bank. We highly discourage you from relying solely on PPC as your search engine marketing strategy. Its damn expensive!

9. Time is the Answer

So after everything you have learned, you might get the impression that you simply need to plug away and dutifully wait for the search engine spiders to come and gobble up your site and give you the rankings. Keep plugging away and putting in the hours for a few years and you will gradually rise to the top. No unfortunatley it is entirely possible that you will sink literally thousands of hours of employee time into your SEO strategy and never gain anything substantial back.

10. Money is the Answer

There aren't many things in life that can not be sorted out by simply throwing unlimited bundles of cash at. That's a sad fact that goes a long way to explaining why the rich get richer whilst the poor get poorer. Thankfully though in SEO terms this is not entirely true and it is definitely possible for a small operation to outrank huge coorporations with vastly larger budgets and resources.

So what is the answer?

That's the rub. There is no definitive answer to what is going to work in SEO. And even if I was to start spilling the beans on some currently successful techniques, there is every chance that by the time you read this article they have already expired or become much less effective.

Related Blogs
Scary SEO Myth Number 5
The SEO Myth
SEO Myths
Three SEO Myths Debunked
Busting Google Indexation Myths
Are We Suffering from Pagerank Paranoia
There are No Secrets and Other SEO Myths