the root location can be configured at the siteaccess level, so you should loop until the configured root location.