0

I am accessing 2 URLs. The domain name/server part is the same. The resource part is different.

The URLs are like the following:

https://aa.bb.com/dir1/dir2

https://aa.bb.com/dir3

When I access the first URL, I get redirected to the second URL. Is it possible that the second URL be hosted on a different web server than the first or both resources would be on the same web server?

user2125853
  • 915
  • 4
  • 10
  • 20

1 Answers1

1

If by web server you mean physical computer, absolutely they could be on different servers. Google and Akamai, among others, have large collections of machines serving the same domain names. It helps with speed, since you are likely to receive pages from a server near you.

In general, it does not appear to be possible to reliably tell whether you are talking to the exact same server before and after a redirect. First, it is difficult to test for IP addresses from a Web page (see, e.g., this question and this one). Second, even if the IP addresses are the same before and after the redirect, they may be on different machines. For example, TCP anycast can change which server you are talking to without changing the IP address. Also, network address translation and load-balancing may change which server you are talking to behind a firewall, which you would probably have no way of finding out unless the server provided some ID of its own.

Community
  • 1
  • 1
cxw
  • 15,429
  • 2
  • 37
  • 69
  • Is there a way to tell if the resources are on different web servers? – user2125853 Mar 10 '15 at 12:31
  • @user2125853 - edited. In general, probably not. If you control the servers, sure! If this answer helps, would you please hit the checkmark to accept it? Thanks! – cxw Mar 10 '15 at 18:17