mail us  |  mail this page

contact us
training  | 
tech stuff  | 

Valid Names and Labels

Host Names (or 'labels' in DNS jargon) were traditionally defined by RFC 952 and RFC 1123 and may be composed of the following valid characters.

A to Z ; upper case characters
a to z ; lower case characters
0 to 9 ; numeric characters 0 to 9
-      ; dash

The rules say:

  1. A host name (label) can start or end with a letter or a number
  2. A host name (label) MUST NOT start or end with a '-' (dash)
  3. A host name (label) MUST NOT consist of all numeric values
  4. A host name (label) can be up to 63 characters

RFC 2181 significantly liberalized the valid character set including the use of "_" (underscore) essentially saying that anything goes and its up to the client to validate in context. If you want to be safe stick with the rules above if you need the expanded capabilities (e.g. SRV RRs) use them. However you are taking a risk that one vital system will not talk to you at 3AM in the morning due to an upgrade!

The named.conf statement check-names allows control over the names accepted.

Domain names are defined to be case insensitive (essentially so you don't have to register every possible variant of your domain name) but the rule is that case should be preserved since this may change in the future. Host names seem to obey the same rules - essentially as an artifact of subdomains.

Host Name Examples

; for clarity we show a host name in A records
www        IN      A      192.168.0.3 ; valid
wWw        IN      A      192.168.0.3 ; valid
my www     IN      A      192.168.0.3 ; invalid
my-www     IN      A      192.168.0.3 ; valid
my_www     IN      A      192.168.0.3 ; invalid but may work
3www       IN      A      192.168.0.3 ; valid
-www       IN      A      192.168.0.3 ; invalid
5512       IN      A      192.168.0.3 ; invalid
host-5512  IN      A      192.168.0.3 ; valid
@www       IN      A      192.168.0.3 ; invalid


Problems, comments, suggestions, corrections (including broken links) or something to add? Please take the time from a busy life to 'mail us' (at top of screen), the webmaster (below) or info-support at zytrax. You will have a warm inner glow for the rest of the day.

Pro DNS and BIND by Ron Aitchison

Contents

tech info
guides home
dns articles
intro
contents
1 objectives
big picture
2 concepts
3 reverse map
4 dns types
quickstart
5 install bind
6 samples
reference
7 named.conf
8 zone records
operations
9 howtos
10 tools
11 trouble
programming
12 bind api's
security
13 dns security
bits & bytes
15 messages
resources
notes & tips
registration FAQ
dns resources
dns rfcs
change log

Creative Commons License
This work is licensed under a Creative Commons License.

If you are happy it's OK - but your browser is giving a less than optimal experience on our site. You could, at no charge, upgrade to a W3C STANDARDS COMPLIANT browser such as Firefox

web zytrax.com

Share Page

share page via facebook tweet this page submit page to stumbleupon submit page to reddit.com

Page Features

Page comment feature Send to a friend feature print this page Decrease font size Increase font size

RSS Feed Icon RSS Feed

Resources

Systems

FreeBSD
NetBSD
OpenBSD
DragonFlyBSD
Linux.org
Debian Linux

Applications

LibreOffice
OpenOffice
Mozilla
SourceForge
GNU-Free SW Foundation

Organisations

Open Source Initiative
Creative Commons

Misc.

Ibiblio - Library
Open Book Project
Open Directory
Wikipedia

SPF Resources

Draft RFC
SPF Web Site
SPF Testing
SPF Testing (member only)

Site

CSS Technology SPF Record Conformant Domain
Copyright © 1994 - 2017 ZyTrax, Inc.
All rights reserved. Legal and Privacy
site by zytrax
Hosted by super.net.sg
web-master at zytrax
Page modified: October 21 2015.