Forum Moderators: open

Message Too Old, No Replies

Will javascript conditional redirect result in penalty?

Javascript Redirect Penalty?

         

buzzmaster

1:55 pm on Jan 13, 2003 (gmt 0)

10+ Year Member



There are two sites that serve similar but different industries. Let's say the first site ends up ranking high for keywords that more accurately target the second site (due to higher pagerank). Rather than have the visitors click through to the wrong site, the first site includes a script like the following:

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
// ***
// Redirect to 2nd when incoming from search engine with
// keywords related to that site
// ***
if (document.referrer.indexOf("google.com")!= -1 &&
(document.referrer.indexOf("keyword2")!= -1 ¦¦ document.referrer.indexOf("keyword3")!= -1)) {
window.location.replace("http://www.2ndwebsite.com");
}
// End -->
</script>

Would this type of conditional redirect cause google to get upset? Basically the first site is trying to offer up the most pertinent info to the user, not a spam attempt.

Brett_Tabke

2:21 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Yes, and don't be shocked to learn that google scans javascript looking for such stuff. Break the "g" word up so it is split over two lines and is tougher to parse out.

buzzmaster

2:46 pm on Jan 13, 2003 (gmt 0)

10+ Year Member



Thanks for the heads up. We had something like this on our site for about the last week.

I just took it off.