{"record":{"id":"623265b0d70d7004","repo":"nextcloud/all-in-one","slug":"domain-must-contain-at-least-one-dot","errorCode":null,"errorMessage":"Domain must contain at least one dot!","messagePattern":"Domain must contain at least one dot!","errorType":"validation","errorClass":"InvalidSettingConfigurationException","httpStatus":422,"severity":"error","filePath":"php/src/Data/ConfigurationManager.php","lineNumber":599,"sourceCode":"    }\n\n    public function getAioVersion() : string {\n        $path = DataConst::GetAioVersionFile();\n        if ($path !== '' && file_exists($path)) {\n            return trim((string)file_get_contents($path));\n        }\n        return '';\n    }\n\n    /**\n     * @throws InvalidSettingConfigurationException\n     *\n     * We can't turn this into a private validation method because of the second argument.\n     */\n    public function setDomain(string $domain, bool $skipDomainValidation) : void {\n        // Validate that at least one dot is contained\n        if (!str_contains($domain, '.')) {\n            throw new InvalidSettingConfigurationException(\"Domain must contain at least one dot!\");\n        }\n\n        // Validate that no slashes are contained\n        if (str_contains($domain, '/')) {\n            throw new InvalidSettingConfigurationException(\"Domain must not contain slashes!\");\n        }\n\n        // Validate that no colons are contained\n        if (str_contains($domain, ':')) {\n            throw new InvalidSettingConfigurationException(\"Domain must not contain colons!\");\n        }\n\n        // Validate domain\n        if (filter_var($domain, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME) === false) {\n            throw new InvalidSettingConfigurationException(\"Domain is not a valid domain!\");\n        }\n\n        // Validate that it is not an IP-address","sourceCodeStart":581,"sourceCodeEnd":617,"githubUrl":"https://github.com/nextcloud/all-in-one/blob/6b788eec5e61733cf03ed380a3572e43ae3f11ce/php/src/Data/ConfigurationManager.php#L581-L617","documentation":"First syntactic check inside ConfigurationManager::setDomain() in the Nextcloud AIO mastercontainer: a submitted domain must contain at least one dot, i.e. it must be a multi-label DNS name, not a bare hostname. Violations throw InvalidSettingConfigurationException, which ConfigurationController::SetConfig converts into an HTTP 422 response whose body is exactly this message, displayed in the AIO web UI. The check runs before DNS validation and cannot be skipped by the 'skip domain validation' option.","triggerScenarios":"POSTing the AIO settings form (POST /api/docker/config) with domain='mycloud', 'server' or 'nextcloud'; a typo that drops the TLD ('cloud.example'); pasting an internal single-label hostname.","commonSituations":"Home-lab users without a purchased domain trying a LAN hostname; users coming from tools that accept single-label hosts; scripts posting the config API with an unqualified name.","solutions":["Submit a fully qualified domain name such as 'cloud.example.com'","Point a real (sub)domain at your server — a free deSEC or dynamic-DNS subdomain is sufficient","Do not try a bare hostname: AIO's later DNS validation needs a resolvable dotted name, so a single label can never pass"],"exampleFix":"// before\ndomain = 'mycloud'\n// after\ndomain = 'cloud.example.com'","handlingStrategy":"validation","validationCode":"$domain = trim($input);\nif (!str_contains($domain, '.')) {\n    // reject before POSTing: AIO requires a dotted DNS name\n    $errors[] = 'Domain must contain at least one dot';\n}","typeGuard":null,"tryCatchPattern":"use AIO\\Data\\InvalidSettingConfigurationException;\n\ntry {\n    $configurationManager->setDomain($domain, $skipDomainValidation);\n} catch (InvalidSettingConfigurationException $e) {\n    // designed user-facing channel: the controller returns the message as HTTP 422 body\n    $formErrors[] = $e->getMessage();\n}","preventionTips":["Configure a real DNS (sub)domain before touching the AIO domain field","Validate the domain client-side (must contain a dot) before submitting the form","Never submit hostnames, IPs or URLs — only bare dotted DNS names"],"tags":["php","nextcloud-aio","domain-validation","configuration","input-validation"],"backgroundTag":"invalid-domain-format","analyzedSha":"6b788eec5e61733cf03ed380a3572e43ae3f11ce","analyzedAt":"2026-08-21T05:47:24.382Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}