Forming a domain name for services
From ISPWiki
If a customer does not provide the domain name while ordering the service, BILLmanager will generate it automatically according to the following rules:
- It will locate the template that will be used to form a domain name. The first found from the list below will be used:
- "Domain template" in the package's properties;
- "Free domain name" in the project or provider's properties, depending on the version of BILLmanager.
- example.com
- The template must have the following parameters:
- @ID@ - is changed into the service ID from the BILLmanager database;
- @TYPE@ - is changed to the service type:
- for shared hosting - vhost
- for virtual hosting reselling - rhost;
- for virtual servers - vds;
- for dedicated servers - dedic.
- @USERNAME@ - is changed into the name of the BILLmanager user who ordered the service.
If neither @ID@ nor @USERNAME@ is used, the template has no parameters or it is empty, the username prefix will be added to the domain name.
- The domain name will be checked. If it is not unique, the minimum number that will provide its uniqueness in the database will be added to the domain name.
Examples:
- The empty template will be used to generate the following domain names: @USERNAME@.example.com or @USERNAME@#.example.com, where # is a figure that can be used if the domain name already exists in the database.
- The templates like "your-free-domain-name" will be used to generate the following domains: @USERNAME@.your-free-domain-name or @USERNAME@#.your-free-domain-name, where # is a figure that will be used, if the domain name already exists in the database.
- The templates like @ID@-@TYPE@-@USERNAME@-@ID@-somedomain.@TYPE@-@ID@.somedomain will be used to form the following domains: 1000-vhost-ImUserName-1000-somedomain.vhost-1000.somedomain, where 1000 is the number of the service in the database, vhost is the type of the service a user wants to order, ImUserName is a username.
- etc.
