1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Protect Text from Search Engines.

Discussion in 'HTML & JavaScript' started by Zakk-, Nov 19, 2009.

  1. Zakk-

    Zakk- Junior Member

    Joined:
    Sep 16, 2009
    Messages:
    141
    Likes Received:
    15
    I was wondering if there was a bit of Javascript I could use to tell a search engine to not index a certain bit of text, sort of like the [.CODE] tags here on BHW.

    I want to do this to stop Google from indexing authorization codes I am covering with BHCB but I want other parts of the same page to be indexed (aka, description.)



    So basically this is what I am looking for...


    [indexed]
    Below are the authorization codes for ********, feel free to use them.
    [/indexed]


    [not-indexed]
    AUTHORIZATION1
    AUTHORIZATION2
    AUTHORIZATION3
    [/not-indexed]
     
  2. Entrepreneur

    Entrepreneur Regular Member

    Joined:
    Oct 12, 2007
    Messages:
    438
    Likes Received:
    379
    Why not create a separate page with just the auth codes within it and have noindex, nofollow,nocache meta tags, then iframe it from your main page? That would solve your problem.
     
  3. Zakk-

    Zakk- Junior Member

    Joined:
    Sep 16, 2009
    Messages:
    141
    Likes Received:
    15
    Ah, I wasn't thinking that far out of the box, but that will work perfect. Thank you.
     
  4. showboytridin

    showboytridin Regular Member

    Joined:
    Sep 5, 2009
    Messages:
    348
    Likes Received:
    714
    Location:
    127.0.0.1
    Put the codes in images. That 's a simple, but very good solution for you.
     
  5. SpamHat

    SpamHat Junior Member Premium Member

    Joined:
    Apr 27, 2009
    Messages:
    151
    Likes Received:
    67
    Location:
    UK
    ^^ Google may still index that.

    Google doesn't do ajax yet from what I've seen.
     
  6. showboytridin

    showboytridin Regular Member

    Joined:
    Sep 5, 2009
    Messages:
    348
    Likes Received:
    714
    Location:
    127.0.0.1
    Get the image with the code in a captcha style. It will not read for sure.