Knowledge Archives
http://www.co-internet.net/net/articles/cloakmetatags.txt.html

Cloaking Meta Tags
------------------------------------------------------
by
Ralph Tegtmeier
------------------------------------------------------

(rt) This short tutorial will cover the cloaking of web
page meta tags, which follows a different procedure than
the IP delivery and full page cloaking method commonly
employed for high grade stealthing.

Server Requirements
-------------------
To take advantage of this procedure you must be able to
make use of Server Side Includes (SSI) on your web
server.
Note IIS/4.0 users: The code presented here is an
extended SSI expression which is not supported under
IIS/4.0.

Meta tag cloaking is effected by excluding browsers
from viewing certain parts of a web page, specifically
the header where meta tags are positioned by default.

Browsers are determined by their UserAgent variable.
Once properly cloaked, it won't make any difference
whether you read the source code online or whether you
download it for viewing offline – the meta tag code will
remain hidden, the browser will not be able to read it
and will therefore not download it either.

Browser UserAgents
------------------
Here is a list of UserAgents as used by popular web
browsers:

- "Lynx": Lynx text browser
- "Mozilla": Netscape browsers
- "MSIE": Microsoft Internet Explorer
- "NCSA Mosaic": Mosaic technology based browsers
like Spry, Spyglass, etc.
- "Opera": Opera browser
- "WebTV" - WebTV's proprietary browser

Activating SSI
--------------
The .htaccess File

If your web server is not configured for SSI by
default, you will need to upload a file named
".htaccess" (please note the period/dot at
the beginning of the file name!) to your server
directory. This can be done by Telnet or FTP.

The .htaccess file should have the following content:

---------------------------------
.htaccess entries below this line
---------------------------------

Options Includes +ExecCGI
AddType text/x-server-parsed-html .html

---------------------------------
.htaccess entries above this line
---------------------------------

Note that many web servers will not require the
specfication "Includes", meaning you can omit it
altogether. However, since it won't do any harm to keep
it in your file, we suggest you do not change the above
entry. Thus, should you switch servers some day, you
will not have to readjust your .htaccess file.

After you have uploaded the modified .htaccess file
(MUST be in Ascii mode!), you're ready to go.

In the HEADER section of the web page whose meta tags
you wish to protect, place the following code:

----------------------------------
First HEADER entry below this line
----------------------------------



----------------------------------
First HEADER entry above this line
----------------------------------

VERY IMPORTANT (1)
==================
The above should actually be in one SINGLE line!
As email clients tend to word wrap lines which are too
long for display, we have done their job here for
better readability.
But make no mistakes: The code above MUST be free from
line wraps, or it won't work!

Under this first header entry, you may now add the
actual meta tags you wish to protect.

When you are done, you must close the protected section
with the last header entry, or the rest of your page
won't be displayed either!

------------------------------------------------------
Last HEADER meta tags protection entry below this line
------------------------------------------------------



------------------------------------------------------
Last HEADER meta tags protection entry above this line
------------------------------------------------------

VERY IMPORTANT (2)
==================
If you have other entries in your page header (e.g. for
an external CSS style sheet, an external JavaScript
applet, etc.) you MUST place these OUTSIDE the
protected area (but WITHIN the header tags) or they
will not work unless you are operating with a browser
sporting a UserAgent not included in the code above.

So what does it do?
-------------------
The SSI code outlined above will determine the accessing
browser by its UserAgent variable. If it is recognized,
the system will skip the content within the exclusion
tags, effectively preventing the meta tags from being
displayed.

Search engine spiders not using common browser
UserAgent variables (most don't) will still get to read
the meta tags nevertheless, which is, of course, what
you want them to do.

Limitations
-----------
The method outlined above may well qualify for "poor
man's cloaking" - it is NOT an industrial-strength
protection against code snoops, the more so as
UserAgents can easily be forged ("spoofed"), but it will
cover about 95% of all ordinary browsers and their
users without putting an undue strain on server load
and, hence, system performance.

Bear in mind, too, that meta tags are gradually losing
in importance as many search engines have stopped
indexing them because of massive abuse by keyword
spamming ("spamdexing") and irrelevant description tags
in the past.

Other uses
----------
This technique can also be used to prevent email
harvester bots (address extractors) from culling email
addresses from textarea fields, e.g. if you happen to
display your ezine complete with editors' addresses in
text format on your web site.

Further resources
-----------------
Read more about protecting textarea fields from email
harvesters here:
< http://fantomaster.com/faarticles0.html#protect-email-addresses >

A more detailed discussion of this method, including
some practial demonstrations, can be found on our web
site at:
< http://fantomaster.com/fasmbacntut01a.html >



This text may freely be republished or distributed in unmodified form provided the following resource box is included intact either at the beginning or the end of the article and a complimentary copy or notice (link) is sent to the author at the address specified below:

Ralph Tegtmeier is the co-founder and principal of fantomaster.com GmbH (Belgium), < http://fantomaster.com/ >, a company specializing in webmasters software development, industrial-strength cloaking and search engine positioning services.

He has been a web marketer since 1994 and is editor-in-chief of fantomNews, a free newsletter focusing on search engine optimization, available at: < http://fantomaster.com/fantomnews-sub.html > You can contact him at mailto:fneditor@fantomaster.com
(c) copyright 2002 by fantomaster.com
All rights reserved.
Downloaded at: < http://fantomaster.com/ >