Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this weird problem. I need to access a website that contains an underscore from Linux. The hostname is invalid and Linux does treat it as such.

The problem is that access from Windows seems to work just fine and therefore the admin won't fix it.

Is there any way to access such site?

EDIT: The hostname is: _nyx.isthereanydeal.com

host works

ping and browsers don't work, I have tried both un-encoded and encoded versions of the hostname

share|improve this question
Did you try to use the hex value instead (url encoded)? – lynxlynxlynx Jul 30 '12 at 13:04
Does hostname resolution work? Then you could at least access the website via IP if there isn't any virtual host depending on the actual host name. – scai Jul 30 '12 at 13:12
@scai host works, ping and browsers don't, and the problem it's one sub-hostname, so yeah virtual hosts are present. – Let_Me_Be Jul 30 '12 at 13:14
up vote 5 down vote accepted

Since you can find the IP with host, add an entry to your /etc/hosts file with a new name to the same IP.

/etc/hosts  u_nyx.isthereanydeal.com


$ ping -c 1 u_nyx.isthereanydeal.com
PING u_nyx.isthereanydeal.com ( 56 data bytes
64 bytes from icmp_seq=0 ttl=48 time=69.157 ms

--- u_nyx.isthereanydeal.com ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 69.157/69.157/69.157/0.000 ms
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.