Back to articles

Length restrictions for storing email addresses.

Define the email address length suitable for database storage while respecting RFC 3696.

Cloud
Length restrictions for storing email addresses.

Published on 09/19/2024, last updated on 10/05/2024

Storing information in a database can lead us to wonder what size to allocate to the storage of this data. For e-mail addresses, RFC 3996 (document describing the technical specifications of the Internet) defines the restrictions on sending and storing e-mails.

Restrictions for sending and storing email addresses

Structure

The email address is made up of two parts, the local address before the @ and finally the domain which respects the same restrictions as domain names.

Maximum length

  • The local part can contain up to 64 characters.
  • The domain part can have up to 255 characters.
  • The full address must not exceed 320 characters.

Plan

 Mail storage size restriction

Exemple

In the example above the local address user.name must not exceed 64 characters, the @ counts as 1 character and the domain domain.website-example must not exceed 255 characters.

Share this article on social networks with your friends

Leave a comment

Log in to leave a comment