Feeding subscription-based content only to the spider (
New York Times
Using cloaking to disable URL-based session handling (trans_sid) for spiders
Rendering Images as Text
Unfortunately, as discussed in Chapter 6, the use of graphics containing text is detrimental to search
engine optimization. The reasoning is simple — search engines cannot read the graphics contained by
text. So one obvious ethical use of cloaking would be to detect if a user agent is a spider, and replace
the images with the text included by the said image. Using the cloaking toolkit in this chapter, it would
be implemented as follows:
echo ‘Wacky Widget Model XX’;
echo ‘<img src=”/images/wacky-widget-model-xx.gif”>’;
We will note, however, that sIFR is likely a better solution to this problem for text headings, because it
does not entail the same risk. sIFR is discussed in detail in Chapter 6.
Redirecting Excluded Content
As discussed in Chapter 5, if you have, for example, a product in three categories, it will usually result in
two almost identical pages with three different URLs. This is a fundamental duplicate content problem.
In Chapter 3 we suggested the concept of a “primary category,” and then proceeded to exclude the non-
primary pages using
or meta-exclusion. The cloaking variation is to simply 301 redirect all
non-primary pages to the primary page if the user agent is a spider.
This example is demonstrated in Chapter 14 in the sample e-commerce store catalog.
Feeding Subscription-Based Content Only to Spiders
This is the
New York Times
example. In this case, the code would detect if a user agent is a spider, then
echo either a substring of the content if the user agent is human, or the entire content if it is a spider.
Using the cloaking toolkit in this chapter, it would be implemented as follows:
echo substr($content, 0, 100);
Chapter 11: Cloaking, Geo-Targeting, and IP Delivery
c11.qxd:c11 11:01 233