Skip to content

[Bug]: Noindex silently ignored for service domains that include a port (v4.3.15+) #11965

Description

@easeev

Description and Error Message

On a Docker Compose service whose domain includes a port (e.g. https://app.example.com:3000, as produced by SERVICE_FQDN_WEB_3000), setting Search engine indexing → Noindex has no effect: after a deploy the generated Traefik labels contain no X-Robots-Tag middleware, and responses carry no X-Robots-Tag header. No error is logged.

This worked on v4.3.10 and stopped working after upgrading to v4.3.23. The two sides of the noindex comparison normalize domains differently:

  • HasNoindexDomains::noindexDomains() strips the port via normalizeNoindexDomain() → DomainPortOverrides::withoutPort() (HasNoindexDomains.php#L74-L76). This was added in v4.3.15. The stored flag becomes https://app.example.com.
  • isNoindexDomain() normalizes only with ValidationPatterns::normalizeApplicationDomainUrl(), which keeps the port (docker.php#L537-L546).
  • fqdnLabelsForTraefik() calls isNoindexDomain($domain, …) with the raw domain, port included (docker.php#L759; same for Caddy at L585). For service applications $domain comes from ServiceApplication::fqdns(), a plain explode(',', $this->fqdn).

So https://app.example.com:3000 is compared against https://app.example.com, never matches, and the middleware is never emitted.

Re-saving the domain in the UI does not help: the save still stores fqdn with the embedded port (https://app.example.com:3000) while noindex_domains is stored portless.

Expected Behavior

  1. A domain marked Noindex gets the X-Robots-Tag: noindex, nofollow middleware regardless of whether its stored FQDN includes a port.
  2. Both sides of the comparison use the same normalization. Likely fix: in isNoindexDomain(), wrap both normalizations in DomainPortOverrides::withoutPort() (or reuse the trait's normalizeNoindexDomain() logic).

Steps to Reproduce

  1. Create a Docker Compose service with a web container declaring SERVICE_FQDN_WEB_3000: /.
  2. Set its domain to https://app.example.com with port 3000 (stored as https://app.example.com:3000).
  3. Domains → Search engine indexing → Noindex → Save.
  4. Deploy. Inspect the generated compose labels / curl -sD- -o /dev/null https://app.example.com/: no X-Robots-Tag.

Workaround (confirmed): clear the Port field on the domain and choose "Use This Port Anyway". The routing port still resolves to 3000 via getRequiredPort(), the portless domain now matches the portless flag, and after redeploy the X-Robots-Tag: noindex, nofollow header is present.

Other resources with a port in their domain will silently lose their noindex header on their next deploy after upgrading.

Coolify Version

v4.3.23 (last known good: v4.3.10; regression introduced by the withoutPort change first shipped in v4.3.15)

Are you using Coolify Cloud?

No (self-hosted)

Activity

  1. added
    🐛 Possible BugReported issues that need to be reproduced by the team.
    on Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 Possible BugReported issues that need to be reproduced by the team.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions