Solved

Default page from google

Posted on 2012-03-29
6
245 Views
Last Modified: 2012-04-24
I'm designing an ASP.net site and notice when I google it all the pages of the site are found. How can I redirect the link to point to the default page no matter what link is clicked from a search engine?

Thank you
0
Comment
Question by:thenrich
  • 3
  • 2
6 Comments
 
LVL 34

Accepted Solution

by:
Paul MacDonald earned 250 total points
ID: 37781949
If you really want to hide the other pages from Google, you could set up a robots.txt file to hide everything but the index page.
0
 
LVL 7

Assisted Solution

by:celazkon
celazkon earned 250 total points
ID: 37781982
Could be done by more ways, from my opinion the easiest is to use session. Generally, if the session starts, redirect visitor to the default page. If the session is already started, then leave him visiting the requested page.
0
 
LVL 5

Author Comment

by:thenrich
ID: 37782025
Are there any good examples of using a robots.txt file with ASP?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 37782049
[celazkon] has a good point.  If you're just interested in forcing everyone to see your home page first, you could do that in code.



Robots.txt will work just fine with ASP/ASP.Net.  Allow your home page.  Disallow everything else.

http://www.robotstxt.org/robotstxt.html
http://support.google.com/webmasters/bin/answer.py?hl=en&answer=156449
0
 
LVL 5

Author Comment

by:thenrich
ID: 37782093
Actaully I kinda like both ideas. I just created the robots.txt file but I won't see the results of that until next time there is a crawl. If there is some example code to valaidate seesion state and redirect that would be great.
0
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 37888335
Sorry, I didn't see the follow-up post.  

You should be able to see if the Session persists or not using the sample from this page:
http://devnet.asna.com/KB/Pages/397.aspx
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question