home | contact us
» Posts tagged "seo"

Items Tagged: seo


Mobile internet usage is perhaps one of the defining revolutions of this decade.

People love how quick and easy it is to quickly look up something on their mobile that they carry around 24/7.

Signs of mobile usage are now all around us. People scroll through websites on tablets, smartphones, notebooks and other web-enabled mobile devices to pass their time.

According to the BBC, almost 50% of people have used the internet whilst away from their computer in a survey last year. In fact that article was published in 2011 so the reality now is probably much higher.

Have a look at these statistics which clearly show how mobile use is climbing year on year and now well over 10% of total usage:

So if you are wanting to increase access to your site this is definitely something to consider!

Developing World

Mobile use is truly becoming a global phenomenon. Whilst China and India have the majority of mobile connections, the use of mobile phones by developing nations is also under a period of rapid growth.

Many people in the developing world are unable to buy or charge a computer but they can afford to use internet on their phone; they often lack a wired internet infrastructure, however the mobile technology is much easier to implement.

Mcommerce

As people have more access to sites on their phones, it is not surprising that they want to buy the things that they see on their phones.

According to a report by SAS and Verdict Consulting survey m-Commerce “is growing fast and will become an integral part of shopping for all ages –
retailers need mobile capability to engage with shoppers as well as sell to them.”

App

Building Apps is quite a bespoke task which means you can modify your app to your specific modifications.

However designing the app means that you need to create it individually for each type of device, so this can become expensive as you will need at the least both an iOS (iPhone etc) app and also an Android app. You might also want a Windows Phone app giving you a total of three separate apps that need to be coded.

The popularity of mobile Apps has not gone unnoticed by Magento themselves as they have launched their own Magento mobile integration.

If you would like to find out more about Magento mobile app capability here is the link to their website.

Mobile Version of your Website

Rather than opting for an app, we always recommend that instead you focus on having a mobile friendly web site.

There are two ways to optimise your site for mobile devices: these are responsive themes and mobile versions. They have positive points and drawbacks and it really depends on what you are looking for.

We offer both types of mobile optimisation so whatever option you decide, we are happy to implement it.

Just in case you are not sure about what the differences between responsive themes and mobile versions is, I shall give some more detail on this below.

Responsive Theme

Responsive themes are basically your current website but with the capability to scale itself to the size of a mobile device. The idea is rather than having one web page you can shape,size and place the elements of your site to fit any size browser.

According to google responsive themes are great for SEOs and for ease of updating the site. This may be because they minimise bounce rate which means it minimises problems of when a visitor presses the back button when the site is unresponsive. This in turn will improve your site ranking. Another SEO benefit is that it directs the user to one URL. It is also easier to update than a mobile version of your site.

Mobile Version

A mobile version is literally a completely different website. This means that you can edit your site to be completely how you want it rather than tweak an existing site. The disadvantages of this is that it can time consuming and expensive.

A mobile version is served up as a completely alternative version of your website if a mobile user agent is detected. For Magento there are some modules that do a nice job of offering a fairly bog standard mobile version which is optimised for slow connections etc. These days with large screen powerful smartphones running on 3G networks, the issues that prompted the mobile version are less of an issue so we tend to lean more towards the responsive strategy these days.

Summary

To summarise it is a great idea to optimise your site with mobile capability so that your customers can properly view your site. Responsive themes are best if you want to have a mobile version of your site that is easier, quicker and cheaper to update, while mobile versions are better if your aims are to have a bespoke mobile version of your site that you would not need to update regularly.


 

I recently had a client that wanted to remove the category structure from their product urls.

There is a option to do this in the admin, but they wanted to redirect all of the existing urls to the shorter one.

The way that I wanted to do this was to truncate the current core_url_rewrite table and regenerate the urls with the “Use Categories Path for Product URLs” set to no, and then override the 404 controller to redirect to the correct url.

However, after the urls were generated, I found that all of the urls including the category path were still included, which meant that the override would not work.

After spending quite a bit of time looking for a way to get round this, I put together a simple override to prevent the category path urls from getting generated.

This had the added benefit of reducing the number of entries in the core_url_rewite table from ~2k entries to under 500, which cut the amount of time that was needed to generate it.

The code is below for anyone else that needs to use this in the future. There are three files in total, set up like this

EdmondsCommerce/
<code>-- Redirects
    |-- controllers
    |   </code>-- Cms
    |       <code>-- IndexController.php
    |-- etc
    |   </code>-- config.xml
    <code>-- Model
        </code>-- Catalog
            `-- Url.php

This is the code for the Model

class EdmondsCommerce_Redirects_Model_Catalog_Url 
  extends Mage_Catalog_Model_Url {

    /**
     * This method is called each time that a url 
     * is generated for a product. It is called for the 
     * root category and each category that the product is in.
     * 
     * This code checks to see if the category passed to it is
     * the root category. If it is it will 
     * add the url rewrite as normal. If not it does nothing
     * 
     * @param Varien_Object $product
     * @param Varien_Object $category
     */
    protected function _refreshProductRewrite(Varien_Object $product, Varien_Object $category) {
        $rootCategory = $this->getStoreRootCategory($category->getStoreId());
        if($category->getId() == $rootCategory->getId()) {
            parent::_refreshProductRewrite($product, $category);
        }
    }
}

If you want to redirect from the existing urls to the new ones, you will need to use the following controller

include_once('Mage/Cms/controllers/IndexController.php');

class EdmondsCommerce_Redirects_Cms_IndexController 
extends Mage_Cms_IndexController {

    /**
     * This checks to see if the site can redirect
     * before displaying a 404
     * @param type $coreRoute
     */
    public function noRouteAction($coreRoute = null) {
        // Get the request
        $request = $_SERVER['REQUEST_URI'];
        // Strip off get params if there are any
        if (strpos($request, '?') !== FALSE) {
            $request = substr($request, 0, strpos($request, '?'));
        }
        /**
         *  This makes sure that no part of the request is included
         *  in the base url. This should help
         *  the system work if it is running from a sub folder
         */
        $parts = explode('/', Mage::getBaseUrl());
        foreach ($parts AS $part) {
            $request = str_replace(array($part, '//'), '', $request);
        }
        /*
         * Combine the request with the base path to get the full url
         * and remove any trailing slashes
         */
        $path = trim(str_replace('http:/', 'http://', str_replace('//', '/', Mage::getBaseUrl() . $request)), '/');
        //Get the last section which should be the product title
        $cleanedPath = explode('/', $path);
        $key = array_pop($cleanedPath);
        //Here we find url keys like the title
        $collection = Mage::getModel('catalog/product')->getCollection();
        $collection->addAttributeToSelect('url_key');
        $collection->addFieldToFilter(array(
            array('attribute' => 'url_key', 'like' => "$key")));
        $products = $collection->load();
        /*
         * Proceed if there is only 1 result, if there are more we
         * don't know which one is correct
         */
        if (count($products) == 1) {
            foreach ($products AS $product) {
                $url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB) . $product->getUrlKey();
                //Check to make sure the url is not the same as the path, should prevent infinite redirects
                if ($path != $url) {
                    header('HTTP/1.1 301 Moved Permanently');
                    header('Location: ' . $url);
                    die();
                }
            }
        }
        // Could not find a suitable url carry out the 404
        parent::noRouteAction($coreRoute);
    }

}

Then use the following xml file

<?xml version="1.0"?>
<config>
    <modules>
        <EdmondsCommerce_Redirects>
            <version>0.1.0</version>
            <depends></depends>
        </EdmondsCommerce_Redirects>
    </modules>
    <global>
        <models>
            <redirects>
                <class>EdmondsCommerce_Redirects_Model</class>
            </redirects>
            <catalog>
                <rewrite>
                    <url>EdmondsCommerce_Redirects_Model_Catalog_Url</url>
                </rewrite>
            </catalog>
        </models>
    </global>
    <frontend>
        <routers>
            <cms>
                <args>
                    <modules>
                        <EdmondsCommerce_Redirects before="Mage_Cms">EdmondsCommerce_Redirects_Cms</EdmondsCommerce_Redirects>
                    </modules>
                </args>
            </cms>
        </routers>
    </frontend>
</config>

 

Very comprehensive list of link building strategies, some great inspiration for anyone looking to boost their SEO.

Mostly common sense though a few interesting ideas you may not gave thought of.

http://pointblankseo.com/link-building-strategies


 

Magento is a typical PHP Model View Architecture (MVC) system which routes its URLs in ways not particularly different from other PHP MVC Frameworks like codeigniter, symphony etc. But the difference it has with other MVC architecture is that most of its routing directives or configurations are XML based i.e. found in one XML file or the other.

For example, www.yourstore.co.uk/index.php/checkout/cart/index, tells Magento to use the checkout module found in app/code/Mage/, use the cart controller (i.e. CartController.php) in app/code/Mage/Checkout/controller/ and run the index action method in the CartController.php, when the last “index” is omitted Magento still defaults to run the index action method, and every other value in the url after the first three url steps, Magento treats them as PHP GET parameters i.e. www.yourstore.co.uk/index.php/checkout/cart/index/store/1 would make $_GET['store']=1

It is this action method that searches through the magneto xml configuration file using x-path to obtain information regarding this request e.g. the indexAction method found in app/code/Mage/Checkout/controller/CartController.php uses Mage::getStoreConfig(‘sales/minimum_order/description’) to get the value of the description node in sales module, the minimum_order node and description child node, which can be found in system.xml in the Sales/etc/ folder.

Its is worthwhile also knowing that Magento uses Apache’s URL rewrite engine (mod_rewrite) to make its URLs SEO friendly i.e. www.yourstore.co.uk/index.php/catalog/product/view/id/1 could be routed to www.yourstore.co.uk/index.php/product1.html which can be regarded as an alias for www.yourstore.co.uk/index.php/catalog/product/view/id/1 to make Google happy and improve the sites SEO.

This basically describes how Magento decides what to do when accessed by a particular URL.


 

On occasion, google and other tools will tell you there’s errors with your sitemap.xml file and not give you the information of what exactly is wrong, so we wrote this little tool to crawl the sitemap and check for 301 redirections and 404 errors.

It is a noddy file and should have much more error handling etc but here’s the basic flow :-

<?php
$screenwidth = 80;
function trimstr($str, $maxlength = -1, $middle = '...') {
	global $screenwidth;
	if ($maxlength == -1) {
		$maxlength = $screenwidth - 1;
	}
	if (count($str) > $maxlength) {
		$partlength = round($maxlength - count($middle) / 2);
		$leftpart = substr($str, 0, $partlength);
		$rightpart = substr($str, 0-$partlength);
		return $leftpart . $middle . $rightpart;
	} else {
		return $str;
	}
}

// First we load the sitemap xml
$xml = simplexml_load_file($argv[1]);
$counter = 0;
$threadcount = 5;
$multihandle = curl_multi_init();
$fourohfours = $threeohones = $twohundreds = 0;
if ($xml->getName() != 'urlset') {
	die("Doesn't look like a valid sitemap!");
}
$total_urls = count($xml->children());

// Then we iterate over it
foreach($xml->children() as $child)
{
	if ($child->getName() == 'url') {
		foreach ($child->children() as $subchild) {
			if ($subchild->getName() == 'loc') {
				echo "Fetching : ".trimstr($subchild, $screenwidth - 12)."\n";
				$counter++;
				addurltostack($subchild);
				if ($counter%$threadcount == 0 || $counter == $total_urls) {
					do {
						curl_multi_exec($multihandle, $running);
					} while ($running > 0);
					processresults();
					echo "\n".$counter.'/'.$total_urls.' urls checked - '.$twohundreds.' 200s; '.$threeohones.' 301s; '.$fourohfours.' 404s.'."\n";
				}
			}
		}
	}
}
echo "\n";
if ($fourohfours > 0) {
	echo "The following urls were 404 returns :- \n";
	foreach ($fourohfoururls as $url) {
		echo $url."\n";
	}
}
if ($threeohones > 0) {
	echo "The following urls were 301 returns :- \n";
	foreach ($threeohoneurls as $url) {
		echo $url."\n";
	}
}
function addurltostack($url) {
	global $curls;
	global $multihandle;
	$ch = curl_init();
	$curls[] = $ch;
	// Set the url path we want to call
	curl_setopt($ch, CURLOPT_URL, $url);
	// Make it so the data coming back is put into a string
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
	curl_setopt($ch, CURLOPT_HEADER, TRUE); 
	curl_setopt($ch, CURLOPT_NOBODY, TRUE); // remove body 
	curl_multi_add_handle($multihandle, $ch);
}

function processresults() {
	global $curls;
	global $multihandle;
	global $fourohfours;
	global $fourohfoururls;
	global $threeohones;
	global $threeohoneurls;
	global $twohundreds;
	global $multihandle;
	foreach ($curls as $ch) {
		$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); 
		$url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL); 
		// Free up the resources $ch is using
		curl_multi_remove_handle($multihandle,$ch);
		curl_close($ch);
		switch($httpCode) {
			case 400 : 
				$fourohfours++;
				$fourohfoururls[] = $url;
			break;
			case 301 : 
				$threeohones++;
				$threeohoneurls[] = $url;
			break;
			case 200 : $twohundreds++;
			break;
		}
	}
	curl_multi_close($multihandle);
	$multihandle = curl_multi_init();
	$curls = array();
}
?>

The above takes about 3/4 hour for an approximately 3000 link sitemap. This script utilises curl_multi so it runs 5 requests at a time to the server.


 

A really easy problem to fix that we still see on some live sites is having the site accessible with and without the www (or whatever sub domain).

On Magento sites this can cause issues with session IDs being appended to URLs that then get indexed by google and cause problems.

Here is a snippet which you can add to your htaccess file to fix this:

RewriteBase / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.php HTTP/
RewriteRule ^index.php$ http://www.domain.com/ [R=301,L]

Obviously you need to change domain.com to be your actual domain.

If your store is running in a sub folder eg http://www.domain.com/magento/

RewriteBase /magento/ RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /magento/index.php HTTP/
RewriteRule ^index.php$ http://www.domain.com/magento/ [R=301,L]

 

Magento redesign with added functionality

This project asked for new functionality to be added to an existing magento site, whilst modifying the design. The changes included modifying the layered navigation, the home page slide show and the layout of the category page. An SEO report was also produced for the site

Bent Shop

The Bent Gay Shop is the UK’s premier gay sex shop. With almost 2000 products on offer there is most certainly something for all gay men.

B-Shop

The project needed a lot of jQuery work to get the various different parts of the site working as they should. jQuery is a Javascript framework that makes implementing impressive effects and functionality a breeze. I really enjoyed working with it on this project.


 

Stage Gear – General Site Improvements

Stage Gear needed a number of aspects of their OSCommerce site improving, including the look and feel, the addition of SEO URLs to improve site ranking, improving search on the site and adding basic Facebook integration.

Stage Gear

Stage Gear is a company that specialise in retailing sound and lighting equipment for use by clubs, pubs, bands and DJs.

Screenshot of Stage Gear web site

This project was terrific as it demonstrates that OSCommerce is still fully capable of running a modern web site.


 

We are big believers in the power of blogs and regular blog posts to boost the SEO performance of sites. Especially ecommerce style sites that can sometimes struggle to get the kind of SEO focus that is required to rank at the top of the search engine results pages.

For this reason we have recently launched our new SEO Blog Service.

There are lots of options and we will tailor a package to suit your specific requirements and budget starting from £120 per month for a minimum of 6 months.

You will get high quality totally original blog stories written on the key themes, words and phrases that you want to promote. If you get us to install the blog for you, we will preconfigure it to get the maximum SEO benefit and will also link it up to a Twitter account so that you can push your message to the widest audience possible.

If you don’t have a blog, or you have one but you never find the time or ideas to write quality blog stories – we really do receommend you give us a call to discuss this exciting proposal.


 

Google’s latest incarnation, dubbed caffeine is set to improve further the quality of Google search results. The focus seems to be on more real time search, fresher content being boosted to the top of the rankings. So just when Microsoft thought they were giving Google a run for their money with Bing, Google take the game another leap forward. It does look like Google will continue to enjoy their near monopoly on search for the forseeable future.

For the average webmaster though its looking like an active fresh content creation programme is going to become an ever more important part of the overall SEO package. At Edmonds Commerce we have been working on setting up an outsourced fresh content service for our clients and will be rolling something out in full in the near future.

We recently launched our outsourced link building service and fully intend to put together a collection of SEO services that can be outsourced as individual services or all together as a bulk package.

Fresh, original and regularly posted relevant content will become an SEO essential for any serious web site.


 
rss icon