Posts from — February 2009
Google, Microsoft, and Yahoo announce duplicate content hints
In a recent announcement on the google blog:
“we now support a format that allows you to publicly specify your preferred version of a URL. If your site has identical or vastly similar content that’s accessible through multiple URLs, this format provides you with more control over the URL returned in search results. It also helps to make sure that properties such as link popularity are consolidated to your preferred version”
This new tag, called canonical, can be easily added to any webpage and allows you to specify a preferred version of the current page. The tag should be placed with the <head></head> tags on your page.
<link rel=”canonical” href=”http://www.yoursite.com/content” />
Is rel=”canonical” a hint or a directive?
It’s a hint that we honor strongly. We’ll take your preference into account, in conjunction with other signals, when calculating the most relevant page to display in search results.
Can I use a relative path to specify the canonical, such as <link rel=”canonical” href=”product.php?item=swedish-fish” />?
Yes, relative paths are recognized as expected with the <link> tag. Also, if you include a <base> link in your document, relative paths will resolve according to the base URL.
Is it okay if the canonical is not an exact duplicate of the content?
We allow slight differences, e.g., in the sort order of a table of products. We also recognize that we may crawl the canonical and the duplicate pages at different points in time, so we may occasionally see different versions of your content. All of that is okay with us.
What if the rel=”canonical” returns a 404?
We’ll continue to index your content and use a heuristic to find a canonical, but we recommend that you specify existent URLs as canonicals.
What if the rel=”canonical” hasn’t yet been indexed?
Like all public content on the web, we strive to discover and crawl a designated canonical URL quickly. As soon as we index it, we’ll immediately reconsider the rel=”canonical” hint.
Can rel=”canonical” be a redirect?
Yes, you can specify a URL that redirects as a canonical URL. Google will then process the redirect as usual and try to index it.
What if I have contradictory rel=”canonical” designations?
Our algorithm is lenient: We can follow canonical chains, but we strongly recommend that you update links to point to a single canonical page to ensure optimal canonicalization results.
Can this link tag be used to suggest a canonical URL on a completely different domain?
No. To migrate to a completely different domain, permanent (301) redirects are more appropriate. Google currently will take canonicalization suggestions into account across subdomains (or within a domain), but not across domains. So site owners can suggest www.example.com vs. example.com vs. help.example.com, but not example.com vs. example-widgets.com.
Plugins:
There have already been some plugins created for auto-generating this tag.
Magento canonical plugin – Download here
Drupal canonical extension – Download here
Wordpress canonical plugin – Download here
February 16, 2009 No Comments
5 search engine ranking tips
Although it is difficult to know exactly what Google and other search engines use to determine your search result rankings, the following are five methods that are known to help your site pages get better keyword targeted traffic:
1) Keyword usage in title tag
It is a good idea to use keywords in your page titles.
The actual text you use in the title tag is one of the most important factors in how a search engine may decide to rank your web page. Also, all major web crawlers will use the text of your title tag as the heading in your listings.
example:
<head>
…
<title>Your page name with keywords</title>
..
</head>
2) Keyword usage in the body of the page
Body text is the text that visitor see on your website.
Don’t overuse keywords in your text. The good rule is to use keywords once or twice in each paragraph of your page. If you are using your keywords too often, search engines might penalize your site and mark you as spam.
The following can’t be crawled by search engines:
- Text embedded in JavaScript of Flash
- Text used in image files (jpg, gif, png, bmp) (However, an alternative to this is to use keywords in the alt tags or in the name of the image file)
- Text that is accessible only on a submit form or other portion of the page that requires some action or interaction with the user
If search engine bots can’t see the text on your website, it won’t be indexed.
3) Age of site
The age of your site is also a factor in your ranking. This is because domains are cheap these days and newer domains are more likely to contain spam or link farms.
4) Popularity of outbound links
It’s not just the types of sites that you link to that counts (which should also be related to your page content). You also need to make sure that you do not link to blacklisted sites (google will many times blacklist your site if you link to too many sites that aready blacklisted.) Once you are on this list, it will be difficult to get back to your previous rank.

Google pagerank (toolbar can be downloaded for free here) is a way for you to get a basic idea of how popular a website is compared to yours. It’s a good idea to link to pages that have an equal or better pagerank.
5) Anchor text around links (external to your domain and internal)
Relevant anchor text should be used in links. This applies not just to external links pointing into your site, but internal links throughout your site.
Anchor text is the text surrounding a link, for example:
<a href=”www.mydomain.com”>your domain link</a>
The anchor text is “your domain link”
February 12, 2009 No Comments
How to turn wordpress into a shopping cart
A great, free plugin for wordpress is called e-commerce plugin. It allows you to turn your wordpress blog into an e-commerce shopping cart.

Installation
Installation is pretty easy. You just need to download the zip file, extract it, and upload it to your wp-content/plugins directory.

Once the plugin is activated, you just need to add a product, and your new shopping cart is ready to go.
Features
All of the new features of this plugin are presented under the “e-commerce” tab. They are split up into the categories: Sales, Products, Groups, Variations, Marketing, and Settings.
Sales:
Gives you a breakdown of the total number of sales for the day
Products:
- Adding, editing, deleting products
- Fields: price, description, and additional description
- product categories
- donation (allow donations)
- stock control
- downloads/digital goods (a download URL can be specified)
- shipping rates through a flat-rate table
Groups:
Groups help your visitors find your products. If you sell t-shirts, hats, and trousers you might want to setup a new group called clothing and then add the categories t-shirts, hats, and trousers to that group.
Variations:
A variation can be anything “optional” about a product. ie: Size, Color, etc
For example: if you are selling t-shirts you might setup a variation set called size with the values small, medium, large.
Marketing:
This is where you can setup coupon codes to use on the products in your store.
Settings:
Various global shopping cart settings such as:
- Taxes (percentage)
- Currency
- Shipping (UPS,USPS, flat rate)
- Payment Modules (paypal, google checkout, and chronopay)
February 10, 2009 No Comments
Improving seo with apache mod_rewrite
What is mod_rewrite?
Mod_rewrite is a rewriting engine (based on regular-expressions) built into the apache webserver and it is used to rewrite urls dynamically. The URL manipulations can depend on various tests, of server variables, environment variables, HTTP headers, or time stamps. Even external database lookups in various formats can be used to achieve highly granular URL matching.
How to install it
Apache by default comes with the mod_rewrite module installed but it is not enabled. So if you have Apache installed on your own server, you will need to enable it.
If you need to install apache on your system, there are many free, easy install packages available:
Xamp – http://www.apachefriends.org/en/xampp.html
apache2triad – http://apache2triad.net/
apachePHPMysql – http://apachephpmysql.narhoz.ru/
EasyWebServer – http://e.w.s.free.fr/index_fr.php
FoxServ – http://sourceforge.net/projects/foxserv/
Setting it up
Once installed, mod_rewrite basically relies on one file for all it’s functionality. It’s called .htaccess. This file should be placed in the root directory of your website.
A simple Redirect
Place the following in a .htaccess file:
RewriteEngine on
RewriteRule ^test\.html$ test2.html
RewriteEngine on should always be placed at the beginning of all your .htaccess files.
Note: If you are using a hosting provider, you may have to place the following line in your file (under rewrite_engine on): RewriteBase /
Script details:
- ^ is used before a URL. If a relative URL is used, it starts in the same directory as the .htaccess file
- $ is used for the end of a string that will be matched.
- \ is used to escape the period, periods need the \ before them if they are not going to be part of the actual rule (in this case, it is part of the filename).
This script will redirect all access from test.html to test2.html. IE: if a user goes to http://www.yoursite.com/test.html, they will be automatically forwarded to http://www.yoursite.com/test2.html
Improving your website SEO
An easy and simple way to generate more keyword related traffic is the following:
RewriteRule ^keyword_1.htm$ /myscript.php [NC,L]
In this example, all requests to keyword_1.htm are actualling going to myscript.php.
Other interesting uses
A) Blocking a specific Ip addressing from accessing your website.
RewriteCond %{REMOTE_ADDR} ^(W\.X\.Y\.Z)$
RewriteRule ^/* http://www.yoursite.com/sorry.htm [L]
Replace w.x.y.z with the IP you would like to block and http://www.yoursite.com/sorry.htm with the redirected URL.
B) Block/redirect a site that is linking to you
RewriteCond %{HTTP_REFERER} ^http://www\.blockedsite\.com [NC]
RewriteRule ^/* http://www.yoursite.com/sorry.htm [L]
Replace http://www.blockedsite.com/ with site you do not want linking to you, and http://www.yoursite.com/sorry.htm with the redirected URL.
C) preventing people from linking to your images
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite\.com [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} ^http://.*$
RewriteRule \.(png |gif | bmp | jpe?g|)$ /images/stopstealing.png [L]
Replace http://www.blockedsite.com/ your site, and /images/stopstealing.png with an image path of choice.
February 9, 2009 2 Comments
Top 5 open source shopping carts
1) Zen cart

URL: http://www.zencart.com
Language: PHP
Features:
In terms of features and large community support , zen cart is the best open source shopping cart. It is also based on Oscommerce, an open source shopping cart writen in March 2000.
- multiple customer modes
- multiple sales and discounts
- multiple ad banner controller
- multiple shipping options/modules
- newsletter manager
- gift certificates
The one complaint I have with all of the oscommerce-based shopping carts is the lack of a proper template and module system. Because module code is not separated from template/cart code, when there are security updates, you need to manually make these changes.
2) Magento
URL: http://www.magentocommerce.com
Language: PHP
Features:
- Multi-language support
- Built-in API for easy integration with 3rd-party services
- Auto-generated Site Map
- Newsletter Management
- One-Page Checkout
- Create one or multiple invoices, shipments and credit memos per order to allow for split fulfillment
Magento is a great shopping cart. However, it doesn’t have as large of a community (or as many user contributions/modules) as some of other open source e-commerce solutions.
3) Prestashop
URL: http://www.prestashop.com/
Language: PHP
Features:
- Product Cross-selling
- Google Checkout module
- Multiple-recipient contact form
- PDF customer invoice
- RSS feed
- Affiliate program
4) Cubecart
URL:http://www.cubecart.com/
Language: PHP
Features:
- Default Templates are valid XHTML & CSS
- Customer Order History
- Product Image Gallery
- Email Marketing
- Inventory Stock Control
- Multiple Tax Classes
5) Agoracart
URL:http://www.agoracart.com/
Language: Perl
Features:
- Store-wide designs stored in main Header and Footer files
- CSS (cascading style sheets) controls over most aspects of the cart design
- Order forms are in HTML for ease of customization
- Javascript like language called AgoraScript; allowing for the use of PERL in store parsed pages (those displayed by the AgoraCart) for greater flexibility of design and function
- Supports an unlimited number of categories
- Items can be marked individually as tax exempt
February 5, 2009 2 Comments