The maximum length of a domain name is 63 characters. Characters may be letters, digits or hyphens.
The rule of 63 characters is defined at
The URL of a website can be longer than 63 characters, as you can work with subdomains and folders.
There exists a discussion about the SEO and marketing aspects of domain length.
Experts preferring a keyword loaded domain say, that you cannot avoid long domain names.
Other experts stress, that a domain name should be short because of memorability.