If I have example.com
in my DNS suffix search list and I open a browser and type www
then the browser will talk to the OS which will talk to DNS; if www
fails to resolve, my OS will append the items from my suffix search list until one succeeds; www.example.com
succeeds so I get an IP which my request will be sent to.
However, looking at the request my browser sends, the host header is set to www
as that's what was typed in the address bar, even though that's not the FQDN that was eventually resolved to the IP. This means that if the web server uses hostname binding it has to listen for www
as well as the FQDN of www.example.com
, or it will fail to recognise the request as being one it should handle.
Do any browsers have functionality to automatically get the resolved FQDN back from the OS / are there any settings that can be tweaked to enable this? If there isn't such functionality, is there a reason (e.g. perhaps the OS doesn't expose info on the FQDN which successfully resolved for some security reason?), or is this scenario just too niche for anyone to have implemented?