Fixed handling of FQDNs vs URLs; implemented punycode encoding for URLs