Use hostname instead of host

Contrary to ``location.host``, ``link.host`` may also return the port number at the end, so the condition fails.