Does anyone know the Google script to exclude text?

I used to use SEO script similar to the following, have searched without success.

<!== exclude-start ==>
Top menu, about, help, etc
<!== exclude-end ==>


If you are trying to prevent part of your page from being indexed by Google, those tags won’t have any effect. In fact, I’m not aware of any tags that will tell Google to ignore part of a page. Of course, you can tell Google to ignore an entire page, but that’s another matter.

Why do you want to do this? It looks like you want to have Google ignore certain menus. Why? If you don’t want it to follow the menus (that is, you want to to ignore the pages that the menu links to), a simple nofollow would do that.

If I’ve misunderstood your question, my apologies. Perhaps you could clarify what you are trying to achieve.


Hi Mike,

Many thanks for your reply. I am delighted to say that after a very lengthy Google search the script was found :frowning:

<!-- google_ad_section_start(weight=ignore) –>
Repetetive text to be ignored

<!-- google_ad_section_end –>

Clarification of the problem:

I have a Google Search Box on my article pages and a search returns umpteen references which are only snippet-menu-links and not the specific article. The snippet-menu-links are hidden in a <span> which only show when the link is hovered.

The idea of excluding the snippet-menu-links with was to eliminate the Googled snippet-menu-links and only show the specific searched article.

Here is a typical page:

file: first-article.php

<!doctype html>
<title>First Article</title>

<div id="main'>
   <h1>First Article</h1>
   <p>lengthy blurb (about 1,000 words) goes here about the First Article</p>

[B]<!-- google_ad_section_start(weight=ignore) -->[/B]
<ul id='dynamic_snippet_links'><!-- Dynamically included on every page article -->
    <a href='second-article.php'>
        Second Article
       <span><?php echo "100 line snippet from the article";?></span> 
    <a href='third-article.php' title="<?php echo "100 line snippet from the article";?>">
       Third Article
       <span><?php echo "100 line snippet from the article";?></span> 
[B]<!-- google_ad_section_end -->

[ot]Apparently Google in their infinite wisdom offer this facility but reserve the right to implementation.

Quite some time ago I had the brilliant idea of having snippet menu links but did not appreciate the subsequent consequences :frowning: I am open to offers as to alternative solutions.


My understanding of google_ad_section_start is that it tells the AdSense bot what to ignore and what to give priority to. It’s got nothing to do with search results, and it will have no effect if the page does not contain AdSense.

At least, that’s my understanding. If it is proving useful for your custom search box, that’s fine, but it’s not what I would expect.


Are you sure that

<!-- google_ad_section_start(weight=ignore) -->
<!-- google_ad_section_end -->

work as you describe? I never found this info before.

So far as I know, for tell google to ignore entire page, use “nofollow/noindex” keyword.
And to tell google to ignore part of a webpage, use

<!--googleoff: index-->

<p>Google will not index this part of html.</p>

<!--googleon: index>

They are instructions were for Google AdSense - not for the Google search engine. They affected how AdSense used to determine what the page is about with regard to selecting the most appropriate ads to display. It has been obsolete for some time -

The googleon: and google:off commands for the search engine are covered on

No, nofollow does not tell Google to ignore a page. It tells it not to follow a link to the page, which is an entirely different matter.


Without reading all the blurb about googleoff and googleon, I tried it locally and discovered that the links on the page became invisible.

A quick search revealed these interesting solutions:!category-topic/webmasters/crawling-indexing--ranking/qrBI_v-N4N0