How to block text on a static html page from showing up to search engines?

by BHW
3 replies
Question from a non-programmer:

Is there an easy method/ some java code that will block certain text in a paragraph to ever show up to search engine spyders? Without having to put it in an iframe?

For example if the paragraph is:

"It is amazing how much bad information is floating around..."

and the goal is to only 'hide' the words 'bad information' from the search engines, how would i go about this?

Thank you for your answer/help
#block #engines #html #page #search #showing #static #text
  • Profile picture of the author mandrake
    Try this:

    Changing HTML using DIV

    The HTML contained within a set of <DIV> tags can be dynamically changed.
    For example:
    <div id="DivExample">
    Hello World
    </div>
    all the HTML enclosed between the <DIV> and </DIV> can be replaced dynamically using the Javascript:
    <script type="text/javascript">
    document.getElementById('DivExample').innerHTML="G ood Afternoon";
    </script>
    Google div html javascript to find more on this.
    cryer.co.uk/resources/javascript/script4.htm

    You can also obfuscate the javascript code so it's less obvious...
    javascriptobfuscator.com

    I hope that helps.
    -Jeffery
    {{ DiscussionBoard.errors[3793193].message }}
    • Profile picture of the author lordspace
      Google's bot *understands* JavaScript.
      It is usually against search engine's policies to serve one content for users and another for search engines. Hope you have a good reason to do this
      Signature

      Are you using WordPress? Have you tried qSandbox yet?

      {{ DiscussionBoard.errors[3794403].message }}
  • Profile picture of the author oclseo
    Originally Posted by BHW View Post

    Question from a non-programmer:

    Is there an easy method/ some java code that will block certain text in a paragraph to ever show up to search engine spyders? Without having to put it in an iframe?

    For example if the paragraph is:

    "It is amazing how much bad information is floating around..."

    and the goal is to only 'hide' the words 'bad information' from the search engines, how would i go about this?

    Thank you for your answer/help
    The easy way is to make it an images, rather than text content.
    Signature
    {{ DiscussionBoard.errors[3794414].message }}

Trending Topics