As mentioned in the article How to Work with Branches, you can divide your e-learning offering into different logical units. You can define a different url for each branch and allow users access their corresponding branch directly.
In order to setup a branch URL the following steps are needed.
Ensure firstly that in System settings page → Identity tab the value in Main URL is correct. It must be the same with your main url of installation.
Then in edit page of a branch specify your preferred domain url for the branch. By default this value is filled in based on branch name
You have also to define in your DNS server that all sub-domain urls are served your server. Use *.main.example.com where main.example.com is your main url.
Lastly in httpd.conf file (or httpd-vhosts.conf depending on your settings) add also a ServerAlias like this ServerAlias *.main.example.com