 |
|
| Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more. |
|
 |

05-24-2006, 12:58 PM
|
|
Junior Member
|
|
Join Date: 04-18-06
Posts: 8
|
|
|
Make SE bots ignore JavaScript
I have an old site which i dont want people to see at all and i got a new site, the one where i want the people to go when they reach my old site.
To achieve this i know of a very simple JS code:
<SCRIPT language="JavaScript">
<!--
window.location="http://www.mynewsite.com";
//-->
</SCRIPT>
Now, i dont want the search engine bots (GoogleBot) to be redirected. I want only real people to reach the new site and the bots can index the old site. As far as i understand, simple JS code can be read by googlebot and i dont want it to be redirected, it might think i run some "doorway" page.
I guess what i need is some more complicated JS redirection code, so the bot wouldnt execute it and stay on the old site? Could anyone please show me of such code or maybe suggest any other working way?
|

05-24-2006, 01:01 PM
|
 |
Senior Member
Latest Blog: None
|
|
Join Date: 10-09-03
Posts: 4,284
|
|
|
hmmm... I'm trying to think of an answer here, and I'm coming up blank.
I'm just wondering, why are you wanting a site indexed that humans can't see? To forward them to the new version?...
|

05-24-2006, 01:09 PM
|
|
Contributing Member
Latest Blog: None
|
|
Join Date: 07-30-05
Posts: 247
|
|
OK, how about.....
Put the redirect in an EXTERNAL JS file and use the robots.txt file to tell them to ignore the JS file????
robots.txt file:
Code:
User-agent: *
Disallow: /redirect.js
|

05-24-2006, 01:52 PM
|
 |
Contributing Member
Latest Blog: None
|
|
Join Date: 03-09-06
Posts: 1,250
|
|
|
SE Bots don't interpret JS as far as I am aware
|

05-24-2006, 01:56 PM
|
|
Junior Member
|
|
Join Date: 04-18-06
Posts: 8
|
|
Quote:
|
Originally Posted by Radnor
OK, how about.....
Put the redirect in an EXTERNAL JS file and use the robots.txt file to tell them to ignore the JS file????
robots.txt file:
Code:
User-agent: *
Disallow: /redirect.js
|
Awesome, gonna try it out, thanks.
|

05-24-2006, 02:00 PM
|
 |
V7N Administrator
|
|
Join Date: 10-13-03
Location: Texas
Posts: 40,411
|
|
Quote:
|
Originally Posted by JamieJelly
SE Bots don't interpret JS as far as I am aware
|
You might be susprised...
Quote:
The Big Interview
"To be completely clear, I think it is our job to try and index sites as they exist on the Web as much as we can. So maybe a mom-and-pop who buys a database or uses cookies or session IDs in the URLs, they shouldn't have to worry about search engines. And so we do as much as we can to try and crawl those things smarter.
A lot of the time it's something as simple as cooperating with bulletin board software makers, for instance, so that you can strip a session ID and things will still show up fine. I totally agree, we try to do our best so, for example, something like JavaScript. We're better at crawling JavaScript than we were even a month ago."
|
|

05-26-2006, 01:29 PM
|
 |
v7n Mentor
Latest Blog: None
|
|
Join Date: 11-01-03
Location: Kansas
Posts: 1,356
|
|
|
Wait, Cricket, what SE is this? Because Google, as far as I'm aware, and from their Cache's of my own site, does not look at JS. I think MSN does though? Or maybe it was Yahoo!, not sure, or maybe Ask.. lol but I'm pretty sure it's not Google.
__________________
█ Izzmo
█ Coding Guru Extraordinaire
█ ZeroWeb Hosting & Design - Customizable hosting for every type of user!
|

05-26-2006, 02:15 PM
|
 |
V7N Administrator
|
|
Join Date: 10-13-03
Location: Texas
Posts: 40,411
|
|
Quote:
|
Originally Posted by Izzmo
Wait, Cricket, what SE is this? Because Google, as far as I'm aware, and from their Cache's of my own site, does not look at JS. I think MSN does though? Or maybe it was Yahoo!, not sure, or maybe Ask.. lol but I'm pretty sure it's not Google.
|
The quote and link I provided is an interview of Google engineer, Matt Cutts. Note that he doesn't say what they do with the information, or even how well they are reading it yet. He only says they are getting better at it.
Last edited by Cricket; 05-26-2006 at 02:20 PM.
|

05-26-2006, 11:49 PM
|
 |
Individualist
|
|
Join Date: 09-27-03
Location: Japan, mostly
Posts: 27,715
|
|
|
Google does crawl some JS links. Not sure which ones though.
__________________
My Facebook - Add Me
“It is no measure of health to be well adjusted to a profoundly sick society.”
JSES
|

05-27-2006, 07:33 PM
|
 |
v7n Mentor
Latest Blog: None
|
|
Join Date: 11-01-03
Location: Kansas
Posts: 1,356
|
|
|
Hmm, interesting stuff, I'll have to research this some more. Thanks for the info Cricket and John.
__________________
█ Izzmo
█ Coding Guru Extraordinaire
█ ZeroWeb Hosting & Design - Customizable hosting for every type of user!
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 06:51 AM.
Powered by vBulletin Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP
|
|
|