Forum Moderators: open

Message Too Old, No Replies

Pages not indexed

location.href or script problem?

         

Sinner_G

9:56 am on Jul 5, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi

My index.html is made of only the <head> (including meta info) and the following script:

<script>location.href = "index.asp"</script>

Now, when I do a search in Google, I get strange results. The index.html gets indexed all right, but not the .asp, although at this stage there is no query string. But it seems that the spider goes to dynamically generated pages nonetheless, because pages are indexed which are linked to only from there.

Altavista on the other side lists only the index.html.

Anyone got a clue what the problem is? A solution would be nice too :-)

gsx

10:59 am on Jul 5, 2002 (gmt 0)

10+ Year Member



Spiders don't execute JavaScript. They either ignore everything between <script> and </script>, or some index it as text.

Solution is:
<html>
...
<head>
....
<script>location.href = "index.asp"</script>
</head>

<body>
<a href="index.asp">Home page</a>
</body>

Sinner_G

11:02 am on Jul 5, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



But then how does Google find the other pages?

gsx

6:02 pm on Jul 15, 2002 (gmt 0)

10+ Year Member



Google will follow links between <a href=...>...</a> and ignore almost any other type of link. Your whole site must be linked together and every page accessible from the home page (although, it doesn't matter how many levels deep) by the <a...> tags so that any search engine to follow it all.

So if you have index.html pointing to sub.html with an <a href> and this points to subb.html with an <a href> and this points to subc.html in JavaScript:

Your visitors will see:
index.html -(a)-> sub.html -(a)-> subb.html -(JavaScript)-> subc.html

The search engines will see:
index.html -(a)-> sub.html -(a)-> subb.html(Contains JavaScript-ignored)

Sinner_G

6:48 am on Jul 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, I got that. But it still does not explain how Google got the other pages, since the only link from the index.html page is in javascript. The other pages are deeper and not to be reached without going through the index.asp.

I also tried to search for direct links from other sites, but there are none.

Marcia

8:52 am on Jul 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>But then how does Google find the other pages?

From #6 of Google Webmaster Information [google.com]:

It is almost impossible to keep a web server secret by not publishing any links to it. As soon as someone follows a link from your "secret" server to another web server, it is likely that your "secret" URL is in the referer tag, and it can be stored and possibly published by the other web server in its referer log. So, if there is a link to your "secret" web server or page on the web anywhere, it is likely that Googlebot and other "web crawlers" will find it.

Could that be the explanation for it?

Sinner_G

9:13 am on Jul 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>Could that be the explanation for it?

Highly unlikely, as there are no outbound links...

But generally, does that mean that googlebot reads logfiles or only those that are published as web pages (e.g. webtrends stats)?