Use host instead of hostname to detect whether a link is local (Thanks to sompylasar for reporting)