fatedier/frp · error
custom domain [%s] should not belong to subdomain host [%s]
Error message
custom domain [%s] should not belong to subdomain host [%s]
What it means
Error "custom domain [%s] should not belong to subdomain host [%s]" thrown in fatedier/frp.
Source
Thrown at pkg/config/v1/validation/proxy.go:87
return err
}
return nil
}
func validateDomainConfigForClient(c *v1.DomainConfig) error {
if c.SubDomain == "" && len(c.CustomDomains) == 0 {
return errors.New("subdomain and custom domains should not be both empty")
}
return nil
}
func validateDomainConfigForServer(c *v1.DomainConfig, s *v1.ServerConfig) error {
subDomainHost := strings.ToLower(s.SubDomainHost)
for _, domain := range c.CustomDomains {
canonicalDomain := strings.ToLower(domain)
if subDomainHost != "" && len(strings.Split(subDomainHost, ".")) < len(strings.Split(canonicalDomain, ".")) {
if strings.HasSuffix(canonicalDomain, "."+subDomainHost) {
return fmt.Errorf("custom domain [%s] should not belong to subdomain host [%s]", domain, s.SubDomainHost)
}
}
}
if c.SubDomain != "" {
if s.SubDomainHost == "" {
return errors.New("subdomain is not supported because this feature is not enabled in server")
}
if strings.Contains(c.SubDomain, ".") || strings.Contains(c.SubDomain, "*") {
return errors.New("'.' and '*' are not supported in subdomain")
}
}
return nil
}
func ValidateProxyConfigurerForClient(c v1.ProxyConfigurer) error {
base := c.GetBaseConfig()View on GitHub (pinned to 6c8a8d0a97)
Solutions
- Remove the custom domain that ends with the server subDomainHost, or use subdomain instead of customDomains for that name.
- Ask the server administrator for the configured subDomainHost and select a custom domain outside of it.
When it happens
Trigger: Raised by validateDomainConfigForClient in pkg/config/v1/validation/proxy.go when a customDomain entry falls inside the subdomainHost domain, which would conflict with generated subdomains.
Common situations: customDomains contains a name under the subdomainHost domain (e.g. subdomainHost is example.com and customDomains includes foo.example.com). Fix by removing the overlapping custom domain or choosing a different subdomainHost.
AI-assisted analysis of fatedier/frp@6c8a8d0a97 (2026-08-15).
Data as JSON: /api/errors/683e1fa9bf7e5791.
Report an issue: GitHub.