Re: underscore illegal dns character
OK, I got bitten by this recently. Apple updated their stack (somewhere around 10.12) and this bit me.
It "is legal" but not in hostnames.
I used to have my live sites as "somesite.com" and the local (test) version as "somesite_com" in my /etc/hosts file.
Apparently you CAN have an underscores but not in hostnames. Yup, that took some tracking down! I only found it by careful observation (some local domains worked, those with underscores did not).
Hey, standards eh? Everyone loves them. Next I'll tell you about the hell that is JSON and/or XML parsing libraries. Actually, no I won't. This sort of tedious complexity makes me want to go back to programming 6502's in assembler code. *old man mumble*