{"record":{"id":"0b7403f903f9b688","repo":"nextcloud/all-in-one","slug":"please-enter-a-domain-and-not-an-ip-address","errorCode":null,"errorMessage":"Please enter a domain and not an IP-address!","messagePattern":"Please enter a domain and not an IP-address!","errorType":"validation","errorClass":"InvalidSettingConfigurationException","httpStatus":422,"severity":"error","filePath":"php/src/Data/ConfigurationManager.php","lineNumber":619,"sourceCode":"\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\n        if(filter_var($domain, FILTER_VALIDATE_IP)) {\n            throw new InvalidSettingConfigurationException(\"Please enter a domain and not an IP-address!\");\n        }\n\n        // Skip domain validation if opted in to do so\n        if ($this->shouldDomainValidationBeSkipped($skipDomainValidation)) {\n            error_log('Skipping domain validation');\n        } else {\n            $dnsRecordIP = gethostbyname($domain);\n            if ($dnsRecordIP === $domain) {\n                $dnsRecordIP = '';\n            }\n\n            if (empty($dnsRecordIP)) {\n                $record = dns_get_record($domain, DNS_AAAA);\n                if (isset($record[0]['ipv6']) && !empty($record[0]['ipv6'])) {\n                    $dnsRecordIP = $record[0]['ipv6'];\n                }\n            }\n","sourceCodeStart":601,"sourceCodeEnd":637,"githubUrl":"https://github.com/nextcloud/all-in-one/blob/6b788eec5e61733cf03ed380a3572e43ae3f11ce/php/src/Data/ConfigurationManager.php#L601-L637","documentation":"Fifth check in ConfigurationManager::setDomain(): if the value validates as an IP address (filter_var with FILTER_VALIDATE_IP, IPv4 or IPv6), it is rejected — AIO requires a DNS hostname for the domain setting. This check runs unconditionally, before the skip-domain-validation logic, so even ticking 'skip domain validation' does not allow IP addresses. Throws InvalidSettingConfigurationException → HTTP 422 in the AIO UI.","triggerScenarios":"domain='192.168.1.10' (LAN IP) or the server's public IP; DDNS users pasting the currently resolved IP instead of the dynamic hostname; quick tests that bypass DNS entirely.","commonSituations":"No domain purchased yet; users wanting IP-only access (unsupported by AIO); confusion between a DDNS name and the address it currently points to.","solutions":["Get a DNS name (a free deSEC / DuckDNS / dynamic-DNS subdomain is enough) that points to the server IP, and submit that name","Do not paste the IP even with 'skip domain validation' enabled — the IP check runs before the skip logic","Accept that AIO needs a domain: for IP-only plans, obtain a cheap or free domain first"],"exampleFix":"// before\ndomain = '192.168.1.10'\n// after\n// create an A record: cloud.example.com -> 192.168.1.10\ndomain = 'cloud.example.com'","handlingStrategy":"validation","validationCode":"if (filter_var($domain, FILTER_VALIDATE_IP)) {\n    $errors[] = 'Enter a DNS name that points to the IP, not the IP itself';\n}","typeGuard":null,"tryCatchPattern":"use AIO\\Data\\InvalidSettingConfigurationException;\n\ntry {\n    $configurationManager->setDomain($domain, $skipDomainValidation);\n} catch (InvalidSettingConfigurationException $e) {\n    $formErrors[] = $e->getMessage();\n}","preventionTips":["Provision the DNS record (dynamic DNS or deSEC) before the AIO setup","Remember 'skip domain validation' does not bypass the IP rejection — it is unconditional","Store hostnames, never addresses, in configuration that feeds the domain field"],"tags":["php","nextcloud-aio","domain-validation","ip-address","configuration"],"backgroundTag":"invalid-domain-format","analyzedSha":"6b788eec5e61733cf03ed380a3572e43ae3f11ce","analyzedAt":"2026-08-21T05:47:24.382Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}