aspose file tools*
The moose likes General Computing and the fly likes Google automatic redirect Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Google automatic redirect" Watch "Google automatic redirect" New topic
Author

Google automatic redirect

ramya narayanan
Ranch Hand

Joined: Oct 06, 2008
Posts: 338
Whenever I type www.google.com, the site is getting automatically redirected to www.google.co.in , what is the functionality behind this automatic redirecting?
How google is doing this?
Any idea!
Any help is appreciated.
Regards.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10384
    
    8

It would seem google takes the IP of the requester and redirects to appropriate server.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
ramya narayanan
Ranch Hand

Joined: Oct 06, 2008
Posts: 338
1)Is it possible to identify the country name from the IP address?
2)The IP address is that
My machine's IP address or internet dynamic IP address?
3)If it's dynamic IP address, then for each page I open in different sites, does each webserver give it's own IP address.
Suppose if i open 10 sites, then does it mean that i'll have 10 different IP addresses?
Regards.
Satish Chilukuri
Ranch Hand

Joined: Jun 23, 2005
Posts: 266
Originally posted by ramya narayanan:
1)Is it possible to identify the country name from the IP address?


Yes, you can lookup the location based on your IP.

2)The IP address is that
My machine's IP address or internet dynamic IP address?

If you are directly connecting to the Internet, your machine IP will be a public IP. But if your company uses a router and your machine is part of a NAT subnet, it will have a private IP with the router having the public IP.

3)If it's dynamic IP address, then for each page I open in different sites, does each webserver give it's own IP address.
Suppose if i open 10 sites, then does it mean that i'll have 10 different IP addresses?

Your machine will be assigned an IP address at the time it starts up (more specifically when networking module starts up). After that the IP doesn't change unless you restart networking.
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1527
Well, if you are in office, you have an ip address. your lan-server provides you that ip. similarly if you are on internet it is your internet-connection-provider that provides you an ip.

We simply believe the fact that internet-service-provider is located at some place or region and that you should also be from that region or around. You can create database to store all such ip-to-region mappings. That is what the link by satish should be doing behind the scenes.


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

In this particular scenario I dont think Google (or any other site) will need the originating IP address. Maybe the address of the last router will suffice. But yes the client IP is the best way to know where the request comes from.


SCJP, SCWCD.
|Asking Good Questions|
Ravikanth kolli
Ranch Hand

Joined: Feb 10, 2008
Posts: 179

google do redirect the request based on the ISPs ip address.

This article would be helpful.


-kolli
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1527
Originally posted by Ravikanth kolli:
google do redirect the request based on the ISPs ip address.

This article would be helpful.


On google homepage it is on Bottom-Right and on the article page it is botttom-left (part of copyright). ;-)
ramya narayanan
Ranch Hand

Joined: Oct 06, 2008
Posts: 338
Is it possible for us to view or know our IP address?
If yes how?
Regards.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38881
    
  23
Look at Satish Chilukuri's post and the link in that.
 
 
subject: Google automatic redirect