Currently the permalinks are saved as absolute urls (domainname/folder/aso). If the root page to not have a domain name, the current domain name where the backend is called are used to build the absolute url.
For root pages without a domain set, the url should be relative!