{"record":{"id":"24c0ddde944564eb","repo":"coredns/coredns","slug":"unable-to-normalize-s","errorCode":null,"errorMessage":"unable to normalize '%s'","messagePattern":"unable to normalize '(.+?)'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/forward/setup.go","lineNumber":138,"sourceCode":"\t\t\tzone = strings.TrimSuffix(zone, \"]\")\n\t\t}\n\t}\n\tif trans != \"\" {\n\t\tnewHost = trans + \"://\" + newHost\n\t}\n\treturn\n}\n\nfunc parseStanza(c *caddy.Controller) (*Forward, error) {\n\tf := New()\n\n\tif !c.Args(&f.from) {\n\t\treturn f, c.ArgErr()\n\t}\n\torigFrom := f.from\n\tzones := plugin.Host(f.from).NormalizeExact()\n\tif len(zones) == 0 {\n\t\treturn f, fmt.Errorf(\"unable to normalize '%s'\", f.from)\n\t}\n\tf.from = zones[0] // there can only be one here, won't work with non-octet reverse\n\n\tif len(zones) > 1 {\n\t\tlog.Warningf(\"Unsupported CIDR notation: '%s' expands to multiple zones. Using only '%s'.\", origFrom, f.from)\n\t}\n\n\tto := c.RemainingArgs()\n\tif len(to) == 0 {\n\t\treturn f, c.ArgErr()\n\t}\n\n\t// Parse block first to get resolver and other options before processing TO addresses.\n\tfor c.NextBlock() {\n\t\tif err := parseBlock(c, f); err != nil {\n\t\t\treturn f, err\n\t\t}\n\t}","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/coredns/coredns/blob/558c9757a92b361e550bdba82d0b4ddf3d12d595/plugin/forward/setup.go#L120-L156","documentation":"parseStanza normalizes the FROM zone with plugin.Host(...).NormalizeExact(). If normalization yields zero zones, the FROM argument is not a valid DNS zone/name expression, so the stanza is rejected with \"unable to normalize '%s'\". This guards the plugin from running with an unparsable zone.","triggerScenarios":"Corefile 'forward <from> ...' where <from> is malformed: illegal characters, an invalid reverse-style name, an empty or nonsense token that NormalizeExact cannot turn into a zone.","commonSituations":"Typo in the zone argument; pasting an URL or path instead of a zone; invalid CIDR/reverse notation like '10.0.0/24' typos; quoting or whitespace corruption in generated Corefiles.","solutions":["Correct the FROM argument to a valid zone, e.g. 'forward . ...' or 'forward example.org ...'.","Use proper reverse-notation: 'forward 10.in-addr.arpa ...' or CIDR 'forward 10.0.0.0/24 ...' with correct syntax.","Validate the Corefile with coredns -conf Corefile (or corefile-migration tool) before deploying."],"exampleFix":"// before\nforward .. 8.8.8.8\n// after\nforward . 8.8.8.8","handlingStrategy":"validation","validationCode":"if len(plugin.Host(from).NormalizeExact()) == 0 {\n    return fmt.Errorf(\"invalid forward zone: %s\", from)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only valid zones ('.', 'example.org', reverse forms) as FROM.","Run coredns -conf in CI to catch syntax errors before deploy."],"tags":["configuration","coredns","validation","forward-plugin"],"backgroundTag":"invalid-argument-format","analyzedSha":"558c9757a92b361e550bdba82d0b4ddf3d12d595","analyzedAt":"2026-09-06T22:47:02.106Z","contentChangedAt":"2026-09-06T22:47:02.106Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}