Input button with onclick event

Discussion in 'HTML & Website Design' started by javafreak, Jan 16, 2007.

  1. #1
    I'm trying to make sure that spiders like Googlebot can index my pages without appending the jsessionid to the URL string. I have a page that has input buttons with an onclick event that simply uses the javascript 'go' function to redirect the user to the availability page, which I do NOT want to be indexed.

    Will the spiders follow this URL? This is the way one of these URLs may appear in the source: go('/avail/45242.jsp;jsessionid=FDDE6BC......'). If the spiders can follow this link, I'll need to do this some other way because I cannot add the rel="nofollow" attribute to the onclick event as far as I know.

    You can see this functionality here:
    http://www.tripcents.com/hotels/us/mo/missouri/branson.html

    Thanks for your help!
     
    javafreak, Jan 16, 2007 IP
  2. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #2
    Just set the urls that you do not want "spiderable" in your robots.txt in the root of your website.
     
    ccoonen, Jan 19, 2007 IP
  3. javafreak

    javafreak Peon

    Messages:
    75
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Good idea! I added this to my robots.txt file:

    User-agent: *
    Disallow: /avail/
     
    javafreak, Jan 20, 2007 IP