3

Let me put it this way:

1.cname.com has a record of X.X.X.X

www.domain.com has a record of 1.cname.com

When a user request www.domain.com from within his/her browser,his/her browser will send an http request.My question is what is the host name THE http request contains.Is it 1.cname.com or www.domain.com?

Thank you!

1 Answer 1

4

The hostname inside the HTTP request (in the Host header) will be the hostname in the URL, www.domain.com in your example.

The Host request-header field specifies the Internet host and port number of the resource being requested, as obtained from the original URI given by the user or referring resource[.] - RFC 2616

2
  • 1
    More exact: The host name is the one typed into the browser, the DNS resolution is irrelevant at this point. The user types"www.domain.com" then this is what is in the request.
    – TomTom
    Mar 18, 2013 at 7:24
  • I sniffed a few packets and found out the host name in the request actually IS the one I typed into the browser. Mar 18, 2013 at 11:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .