Great community. Great ideas.
Welcome to SEOChat, a community dedicated to helping beginners and professionals alike in improving their Search Engine Optimization knowledge. Sign up today to gain access to the combined insight of tens of thousands of members.
Jul 4th, 2012, 08:19 AM
Detecting bot visits with php
If do something like this, at the top of my website home page
if ($bot=="googleBot") //or any of the search engines
//code here for simple HTML of site
ie HTML BODY DIV etc....
just raw HTML to do with the site in question,
Site maps, links
so.. all of this is for the spider to pick up and hopefully index
alt img text
nothing is dynamic, all is hard coded into the markup
no human would ever see this!
//code here for
for Jquery site, which dynically loads in,
everything on one page, but uses # in url bar, fully utilises browser back buttons history
ajax calls, all the works
bots never see this
In short could this be considered good practice? Or not, and if not are the spiders 'clever' enough to know this has been attempted and not index the site? Would this approach stand any chance of working - ie indexing a site with is heavy on Jquery and ajax!
I am going to set it up with a site anyway, to test, and will include my findings here, but anyone out there who could help.... with any experience you have, thank you!
Last edited by rogueIkon; Jul 4th, 2012 at 08:33 AM.
Jul 4th, 2012, 09:13 AM
If bots don't use jQ etc. anyway, then why hide it from them?
This looks like cloaking - for whatever reason - and search engines are pretty good at spotting it nowadays. Needless to say they don't like it...
Jul 4th, 2012, 07:37 PM
thanks for your reply, dzine
If I have, say, the About text in an append command, then that About text would never be seen by the bot, so, it will never be indexed, no matter what keywords I put in it, that match the meta keywords!
In the example php I gave, how exactly is it, that the bot would 'know' that there is one version of the site for bots and another for the humans! Once it requested the page all it would get back is simple yummy HTML, with all the trappings that bots like (or I am told they like) - nothing dynamic at all?
How do bots know? They would have to first of all read the php script itself, then be able to understand the syntax. But the php is returned to the bot as HTML from the server, isn't it?
What am I missing here?
Jul 5th, 2012, 09:14 AM
Personally, I'd still go for the old tried and tested <noscript> element.
As long as the content within that element closely matches the scripted content, it is fine to use the tag. That's what it was intended for, without the need for 'cloaking' etc...
By Valkano in forum Google Optimization
Last Post: Jan 18th, 2006, 05:30 AM
By thall89553 in forum Google Optimization
Last Post: Jun 14th, 2005, 02:40 AM
By bixby27 in forum Other PPC
Last Post: Nov 13th, 2004, 05:12 AM
By GayClarke in forum BING/Yahoo Search Optimization
Last Post: Jun 23rd, 2004, 11:20 PM