phpcurlhttp-headershostheaders

what is the received header when host header value with curl is not set


I am sending a curl request but i am not setting the host header explicitly. What will be the host header as received by the remote url? Will it be my site's domain, or will be automatically be the domain of the remote url?


Solution

  • The Host header is automatically set based on the URL of your request.

    And it's by definition the Internet hostname of the remote URL.