Is it possible to change main domain name? I added a new domain name as addon domain, but the problem now is that the site isn't working on the new domain but when I enter the existing, there shows a root to the new domain name and only this way I can enter it. But now I just want to enter the new domain name and enter the site.
Because the main domain name must be set as the base domain for all services for a host, to change it requires a reconfiguration of the base domain. This can only be accomplished with root server access. On a shared host that means contacting support. Depending on the service provider they may require a small payment to do this.
To apply a second domain name to the same server by which people can access the same website as accessed through the primary domain name requires you adding the alternative domain as a parked domain, pointing at the root domain. Whereas, an add-on domain is a process to allow an additional domain to operate as a separate website on the same server, and this process creates a subdirectory and points the add-on domain at that directory. (A sub-domain is similar to this except it uses the primary domain and a prefix other than www, and the prefix will be the same as the subdirectory that is created.)
It is a strange error that has resulted from the add-on domain - I suspect that the subdirectory name or file that was created for the add-on domain has either affected the structure or over-written the alias for the root www directory.
Either way, remove the add-on domain, check that the primary domain is working correctly again, and then add the secondary domain as a parked domain and this will resolve the issue.