1

I was studying the characters that can be allowed to be a part of an email address. Generally, we know that the email address is of the format localpart@domain, where localpart contains all alpha-numeric characters with special characters (special characters have some restrictions though) as per this wiki link.

My question is, apart from the alpha-numeric and specific special characters [, ], :, - and . are any other special characters allowed in the domain part of the email address? (this question is w.r.t US keyboard)

AlwaysALearner
  • 6,320
  • 15
  • 44
  • 59
  • See also: http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address – johnsyweb Feb 21 '13 at 05:54

1 Answers1

2

A domain name consists of one or more parts, technically called labels, that are delimited by dots .. Labels must follow the LDH (letter, digit, hyphen) Rule in RFC 1035: The characters allowed in a label are a subset of the ASCII character set, and includes the characters a-z, A-Z, 0-9, and the hyphen -. Labels may not start or end with a hyphen.

The "special" characters [, ], :, mentioned in your question are not allowed in a domain name. They could conceivably be part of an email address to a user's mailbox at a machine with an IPv6 address (user@[::1]) but email addresses tend to include fully qualified domain names rather than IP addresses.

Community
  • 1
  • 1
johnsyweb
  • 136,902
  • 23
  • 188
  • 247