As with any standard, there are specifications on what is allowed and what is not allowed. DNS is a standard and as such has certain restrictions on DNS names.
When creating a DNS name, you should be aware of these limitations to prevent any problems from forming and causing issue on your network. The first thing to understand is that not all characters can be used in DNS names. The following characters cannot be used in a DNS name.
! @ # $ % ^ & * ( ) - _ + = { } ` ~ . ? < > [ ] | [space]
When creating your DNS name, your best bet is to stick to numbers and letters. There are also limits on the length of DNS names. The following limits apply when creating DNS names. Host name length is limited to 63 characters and the fully qualified domain name is limited to 255 characters.
For more information see:
RFC 3969 - Application Techniques for Checking and Transformation of Names