I'm interested in making my website a lot more secure and, while playing about scanning other websites, I found that one website responds to nmap traceroute, curl and wget console commands in such a manner that it returns the following response:

Unable to split netmask from target expression

However, the URL itself works fine when accessed from any browser, including via anonymous or pseudo-anonymous internet browsers (like TOR). I would be interested in replicating similar behavior for my website/server.

Can anyone tell me how to do this and what it is exactly that's causing this particular server behaviour?

  • It isn't server behavior at all. It's a error from the tool, which isn't even bothering to attempt to contact the server because you're referencing it incorrectly.
    – Xander
    Aug 11, 2016 at 14:05
  • Ah, you're right. Seems to be because I left the https:// in at the start.
    – user115493
    Aug 11, 2016 at 14:12

1 Answer 1


You are entering a URL with / in it rather than a hostname, and the tools you're using are treating that as a CIDR address (and then failing to parse it).

Compare the following (wrong way, right way):

$ nmap http://www.example.com/

Starting Nmap 6.40 ( http://nmap.org ) at 2016-08-11 10:10 EDT
Unable to split netmask from target expression: "http://www.example.com/"
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 0.04 seconds

$ nmap www.example.com

Starting Nmap 6.40 ( http://nmap.org ) at 2016-08-11 10:10 EDT
Nmap scan report for www.example.com (
Host is up (0.062s latency).
rDNS record for www.example.com
Not shown: 994 closed ports
22/tcp  open  ssh
25/tcp  open  smtp
80/tcp  open  http
443/tcp open  https
587/tcp open  submission
993/tcp open  imaps

Nmap done: 1 IP address (1 host up) scanned in 1.03 seconds

You must log in to answer this question.