urls <- c(
"http://example.com", # registrable domain
"http://_dmarc.example.com", # valid DNS owner name, not a web hostname
"http://a+b.example", # valid RFC reg-name, neither web nor dns
"http://-example.com", # hyphen hygiene failure
"http://a..com", # empty label
"http://localhost", # web hostname, but not registrable
"http://192.168.0.1", # IP literal
"http://xn--nxasmq6b.example.com" # IDN (A-label)
)
check_hosts(urls)
# Score a single rule, or a subset:
check_hosts(urls, rules = c("web", "dns"))
# RFC 3986 reg-name semantics instead of whatwg:
check_hosts("http://2130706433", url_standard = "rfc3986")
Run the code above in your browser using DataLab