Forum Moderators: open

Message Too Old, No Replies

Javascript links to "hide" from googlebot

will using javascript instead of href let me hide some links?

         

webdevsf

5:05 am on Jan 16, 2003 (gmt 0)

10+ Year Member



I have a link on every page that requires the user to login to access it. Unfortunately, google doesn't know this, and follows the darn link every time, only to be redirected to login. Google is indexing upwards of 40,000 pages on my site, and a LOT of those pages are these login redirects.

I'd like to change that one link to something like:

<a href="javascript:navigateToPage(PageName);"> instead of
<a href="/mypage.asp">.

Does anyone know if this will then "cloak" that link from google?

Thx

TheDave

5:17 am on Jan 16, 2003 (gmt 0)

10+ Year Member



I have read that google looks in javascript for links, so maybe not. You should probably investigate sending google access denied errors or something like that I think. I don't know how to do this though :) Another option may be using a form submission to take the user to the login page, ie just a simple button that says login, no form data, and point it to login.

jdMorgan

5:24 am on Jan 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



webdevsf,

How about using robots.txt [robotstxt.org] to tell Google not to request that URL?

Jim

TheDave

6:39 am on Jan 16, 2003 (gmt 0)

10+ Year Member



or yeah, the obvious robots.txt, sorry ;)

webdevsf

6:50 pm on Jan 17, 2003 (gmt 0)

10+ Year Member



It's not a single URL - it's a dynamic URL with a set of params: ie:

this is ok:
foo.com/bar.asp?a=1

but this is not:
foo.com/bar.asp?a=1&coolfeature=2

ie, I don't want the users to get to the cool feature.

I've heard that google will accept wildcards, which would help, but other search engines (ink, altavista, etc) probably won't.

TheDave

3:45 am on Jan 18, 2003 (gmt 0)

10+ Year Member



Ahh I see. When someone makes a request for a page, you should be able to check at the server if they are logged in, and deny them the cool feature. So they can still enter the cool feature url, but it won't actually give them the cool feature, or redirect them to a login page maybe.