I can't think of a way to tell whether XXX.XXX.XXX.42 is an IP or a website from that string alone.
You could require that no subdomain has four "parts" (i.e., A.B.C.42), but that's harsh.
You could require that somewhere in the URL for a four-part numeric-TLD URL there be a character.
You could also require that at least one of the parts of A.B.C.D be X<0 or 255<X.
The last two suggestions are more lighthanded, but harder to implement. They'd all rule out URLs like 1.2.3.4, though.
Quick, register your favorite sequence! (http://oeis.org/)