Could you just use an if statement to check for the user agent? <cfif #CGI.HTTP_USER_AGENT# EQ "Googlebot/2.1 (+http://www.google.com/bot.html)" or #CFI.HTTP_USER_AGENT# EQ "Mozilla/5.0 (compatible; googlebot/2.1; +http://www.google.com/bot.html)"> display this data <cfelse> display this data </cfif> Code (markup): or would it be better to use a list of IP's? If so - how would you go about checking the REMOTE_ADDR against a list of IPs in a txt file, or MySQL table?
That would work but you would quickly end up with a very clunky if statement. Using query to check would be better <cfquery name="checkIP" datasource="#sourcename#"> SELECT IP FROM IPTABLE WHERE IP = #CGI.REMOTE_ADDR# </cfquery> <cfif checkIP.recordcount GT 0> Do this because IP address is in the table <cfelse> Do this because IP address is not in the table </cfif> Personally I think it would be a bad idea to do this because I'm pretty sure that google could send out bots that spoof the user agent and pretend to be from a regular user and then run a comparison with an unspoofed bot. You may well find yourself banished from their listing doing that sort of thing.
You're right - so what's all the hype about? How do people avoid being caught? I'm not sure why people even cloak at all.. Show the bots unique/manually written content, then show users scraped/duped content?? I've read a lot about it here in the forums, but don't completly understand *why* it's done (other than to trick index bots). How do webmasters gain or benefit from using this??
In the old days it was relatively easy to cheat the bots and get an artificially high rating in the search engines. This meant that the search results became poor quality and people migrated to the search engines that weeded out the irrelevant sites. Don't do it BMW did and this happened http://news.bbc.co.uk/1/hi/technology/4685750.stm Rather that cloak make proper use of <title> <h1> <h2> <h3> etc tags and make good copy that is readable by searchengines and people. hope this helps. Seamus
Thanks - My gut told me to stay away from cloacking, and I'm glad I listened. And about making use of <title> <h1> <h2> <h3>, etc.. Would you mind looking at http://teen-health.jruck.com and provide any suggestions as to how I could make the page easier to read by humans & search engine bots? Or if the use of these tags is already up to par? Thanks again for the info!
Hi, to my eye that looks pretty good, but things can always be improved Maybe try wrapping the health articles in an <H> tag because the titles are all pretty relevant and they are acting as a heading on the page so tell google that they are headings. After that just work on building lots of quality inbound links and that is just time and patience. Hope this helps.
What exactly does Google not like about cloaking? Is there a way to cloak that does not break any rules and would be OK with Google even if they knew exactly what you were doing in your code? How have others here done this with Coldfusion? What other code snippets can you share please?