0

InetAddress fails to resolve the following domains:

kymcolux.com
shencan.net
zoocore.com

Tested on my home computer and a VPS with:

InetAddress addr1 = InetAddress.getByName("kymcolux.com");

https://httpstatus.io/ also can't fetch the URLs.

InetAddress throws:

java.net.UnknownHostException: zoocore.com: unknown error
    at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:907)
    at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1302)
    at java.net.InetAddress.getAllByName0(InetAddress.java:1255)
    at java.net.InetAddress.getAllByName(InetAddress.java:1171)
    at java.net.InetAddress.getAllByName(InetAddress.java:1105)
    at java.net.InetAddress.getByName(InetAddress.java:1055)
    at Main.main(Main.java:16)

Strangely they work in my browser.

UPDATE Tried different DNS servers (Google & OpenDNS). Still the same result.

Any ideas? Thanks!

ss1
  • 1,009
  • 15
  • 32

2 Answers2

4

See if it works when you append www to the urls as shown below:

InetAddress addr1 = InetAddress.getByName("www.kymcolux.com");
0

The following sites are not even reachable from my browser without adding the www. initially. You might be able to open them in your browser if you previously visited these sites.

Note the following output:

java.net.InetAddress.getByName("google.com");//google.com/216.58.208.238            
java.net.InetAddress.getByName("www.google.com");//www.google.com/216.58.210.196
yamenk
  • 46,736
  • 10
  • 93
  • 87