On Monday, November 14, 2011 9:58 AM (UTC+13) Charles Dobie wrote:- > Hello listers, > > I know about excluding a complete page from Google search by using > (meta name="robots" content="noindex") in the page's html header, but > what I want to do is exclude only a block of text from a page or pages. > > Here's the problem -- perhaps hundreds of pages on a website might > have, for example, "Text Copyright 2011 by John Doe". Therefore, > "John Doe" gets indexed on each page although John Doe is never > mentioned elsewhere on the page. So when someone googles "john doe", > there is a mass of hits, perhaps none of which are actually useful. > > Is there any way of declaring ("indexing off") yadda yadda ("indexing on") > > Thanks, ================== Charles, This has taken some time to answer - I'm a 'slow thinker'! An iframe is usually the best way to add content to a page that you do not want indexed by the search engine bots. Generally speaking, the good bots will follow all links unless told not to, e.g. <a rel="nofollow" href="somesite.com">Some Site</a> In addition, the iframe source link is in the same format as img and script links, i.e. <iframe rel="nofollow" src="somefile.html" > - and the bots don't normally follow src links. Putting the rel="nofollow" attribute in the iframe is the first line of defence. The second is to use the following meta tags in the head of "somefile.html" :- <meta name="googlebot" content="noindex"> <meta name="robots" content="noindex"> The advantage of the iFrame method is that there will be no links from the iFrame and no reason for a Bot wanting to index it. The Bot knows it is there because it has read the source url for the iFrame's html file, but then finds that it need not go past the iFrame's meta tag. The following example page inserts 'Barry Carlson' into the text using the JavaScript innerHTML method, and the same insertion (green) later in the text using an iFrame. The text block at the bottom (blue) is also inserted using an iFrame. http://freepages.computers.rootsweb.com/~bristowe/xhr/inner-html.html The simple JavaScript method makes use of the setTimeout function to delay the insertion of the text for 1 second after the page has loaded. This should be sufficient to avoid the Google Bot which will have scanned a page within 100 milliseconds of it loading. My preference is to use the iframe method as it is a supported HTML method in all browsers. Barry