Groups | Blog | Home
all groups > dotnet web services > march 2007 >

dotnet web services : HTML-page clicked in Google don't get me to the website



catharinus van der werf
3/15/2007 4:16:34 AM
Hello,

I have build a website with approximately 30 html-pages.
When I search this website in Google, I see the index.html or home.html on
this website, but also other html-pages on this website.
When I click in Google on one of these pages (not index.html or home.html),
I am only linked to that one html-page and not to the website itself.
Does anyone know how to fix this. Is there for example a metatag?

Thanks
Catharinus van der Werf
Leeuwarden
catharinus van der werf
3/15/2007 6:31:24 AM
Hi Scott,

yes of course. But what I mean is that it should take me to the first page
of the website and that is usely the home.html or index.html. So I want to go
to one of these pages.
Thanks
Catharinus van der Werf

[quoted text, click to view]
catharinus van der werf
3/15/2007 7:24:29 AM
Hi Scotte,

Do I need a link to go to the homepage? Is it not possible to go to the
homepage automatically when one clicks on a subpage from outside? And stay on
the subpage, when entering from within the website?

thanks
Catharinus van der Werf
Leeuwarden

[quoted text, click to view]
catharinus van der werf
3/15/2007 8:40:36 AM
Oke Scott,

It's clear you can't help me.
Thanks
Catharinus van der Werf
Leeuwarden
The Netherlands

[quoted text, click to view]
Scott M.
3/15/2007 9:24:13 AM
What are you talking about?

Clicking on a link (in Google or anywhere) is only supposed to take you to
one page. If that page is one of your web pages, you have been taken to
your web site. Hyperlinks don't open web sites, per se. They take you to a
page that is part of a web site.

"catharinus van der werf" <catharinusvanderwerf@discussions.microsoft.com>
[quoted text, click to view]

Scott M.
3/15/2007 10:06:42 AM
There are 2 ways to get to your home page.

1. A direct hyperlink to that page (ie. http://someSite.com/index.html)
2. A link to the domain server itself, with no page in the request (ie.
http://someSite.com)

You indicate that you ARE seeing links to the home page as well as other
pages in the site, so what, exactly is the problem as this is just what you
want to see?


"catharinus van der werf" <catharinusvanderwerf@discussions.microsoft.com>
[quoted text, click to view]

Eugen
3/15/2007 10:14:22 AM
Hi Catharinus,

If I understand correctly, you want to force your web pages that are
"sub-pages", (meaning you reach them by following the functionality of your
application) to re-direct to your web application starting page, if the user
click from outside of the application.

If this is the case ,you can do it programatically. In ASP.NET you have a
Context object and you can deduct the web page you are coming from. I think
you can do this using some server variables as well. In case your page is
called from a wrong page you can re-direct it to the starting web page.

Best regards,
Eugen

[quoted text, click to view]
Scott M.
3/15/2007 11:30:17 AM
[quoted text, click to view]

Where? Sub-pages (as you put it) should always have links on them
(otherwise a user would be stuck there), one of which, should be back to the
home page. But, you mentioned that Google is listing the home page when you
do your search, so what is the problem?

[quoted text, click to view]

Well no! If you click a link to "A", why should it take you to "B"?

[quoted text, click to view]

Huh? You want to leave the sub-page but stay on it as well?

[quoted text, click to view]

Scott M.
3/15/2007 11:58:07 AM
Maybe if you phrased your question more clearly...

"Do I need a link to go to the homepage?"

....and...

"Is it not possible to go to the homepage automatically when one clicks on a
subpage from outside?"

....don't exactly sound like questions that have specific answers. In fact,
these questions make me think that you don't understand how web pages are
accessed and/or how search engines list pages. It doesn't matter if someone
clicks a link to one of your pages from one of your pages or from Google.
They are going to wind up wherever the hyperlink points them to. As I
pointed out earlier, if you want someone taken to your home page, you need
to explicitly give them a hyperlink to that page or just point to the
domain, in which case the home page will be served by default.

It sounds to me like Google is doing exactly what it should and you are
getting exactly what you should. But it also sounds like you belived that
your home page is the entrance to your web site and that entering any other
way is bad or incorrect, which is incorrect.

But, if you would take your time and explain what you want and what you have
more clearly, you might get an answer that helps you.



"catharinus van der werf" <catharinusvanderwerf@discussions.microsoft.com>
[quoted text, click to view]

catharinus van der werf
3/20/2007 3:36:06 PM
Thanks Eugen,

That's my question. Thanks for your answer, but I hoped I could solve it
without ASP.
Now I am afraid it can't.
thanks anyway.

Catharinus van der Werf
www.figuresfirst.nl

[quoted text, click to view]
Scott M.
3/20/2007 9:56:35 PM
Now that I understand your question, I can give you a suggestion:

Add this to the head section of all your non-home page pages:

<script type="text/javascript">
var homePagePath = "your full home page path here"
if(document.location != homePagePath)
{document.location = homePagePath)
</script>

But, I have to say that this is NOT normal web site behavior and I do not
recommend you actually to it. It is what I'd do if I needed to do what you
want, but I just can't think of a case where I'd want to do this. It takes
a lot of power away from the user.


"catharinus van der werf" <catharinusvanderwerf@discussions.microsoft.com>
[quoted text, click to view]
catharinus van der werf
3/27/2007 4:11:15 PM
Hi Scott,

I tried your example, it doesn't work.
But I think there's another possible solution:
Use the following in the head section of the subpages.

<META NAME="Robots" CONTENT="NOINDEX,FOLLOW">
By using this in the head-section you prevent that this page is shown in
google,
even when there are words found in the page that match the google search.

Thanks

Catharinus van der Werf
www.figuresfirst.nl
[quoted text, click to view]
catharinus van der werf
3/27/2007 7:02:37 PM
Hi Scott,

I tried your example, it doesn't work.
But I think there's another possible solution:
Use the following in the head section of the subpages.

<META NAME="Robots" CONTENT="NOINDEX,FOLLOW">
By using this in the head-section you prevent that this page is shown in
google,
even when there are words found in the page that match the google search.

[quoted text, click to view]
Scott M.
3/29/2007 11:54:46 PM
This META tag is not respected by all search engines and, as such, you
shouldn't count on it preventing your non-home page pages from appearing in
search engine results.

The script I provided does work. If you post your version of it, I can tell
you what you may have done wrong.


"catharinus van der werf" <catharinusvanderwerf@discussions.microsoft.com>
[quoted text, click to view]
catharinus van der werf
3/30/2007 1:14:01 AM
Thanks Scott,

especially for your patience. Here is the code that I inserted in one of the
subpages.
Although I inserted all kinds of Meta name keywords, needed for Google, I
have not inserted that in the code below. Thanks in advance

<html>
<head>
<script type="text/javascript">
var homePagePath = "http://www.figuresfirst.nl"
if(document.location != homePagePath)
{document.location = homePagePath)
</script></head>




[quoted text, click to view]
Scott M.
3/30/2007 9:17:39 AM
The problem is that in the script, you haven't included the file name in the
home page path, just the domain name.

It should be something like this (substitute your home page file name):

<head>
<script type="text/javascript">
var homePagePath = "http://www.figuresfirst.nl/index.html"
if(document.location != homePagePath)
{document.location = homePagePath)
</script>
</head>

The "document.location" will return a path that includes the file name of
the current document, so you need to specify the full path of the home page
when you set up the homePagePath variable.

-Scott


"catharinus van der werf" <catharinusvanderwerf@discussions.microsoft.com>
[quoted text, click to view]
Scott M.
4/4/2007 11:23:35 AM
No because semi-colons are optional in JavaScript <SCRIPT> blocks.


[quoted text, click to view]

Steven
4/5/2007 1:04:42 AM
if that is a verbim post, isn't that script missing the semi-colons?

Steven

"catharinus van der werf" <catharinusvanderwerf@discussions.microsoft.com>
[quoted text, click to view]

AddThis Social Bookmark Button