Skip to content

Add www domain redirect support - #404

Open
brainstemu wants to merge 1 commit into
Hubs-Foundation:masterfrom
brainstemu:www-redirect
Open

Add www domain redirect support#404
brainstemu wants to merge 1 commit into
Hubs-Foundation:masterfrom
brainstemu:www-redirect

Conversation

@brainstemu

Copy link
Copy Markdown

What?

Adds support for redirecting www.$HUB_DOMAIN to $HUB_DOMAIN in the HCCE Kubernetes deployment template.

The change also updates the SSL script so the www hostname is included in certificate handling.

The redirect uses the existing $HUB_DOMAIN and $Namespace template variables rather than deployment-specific values.

Why?

HCCE deployments may be accessed through both the root domain and the www subdomain.

Previously, the www hostname was not handled by the deployment template, which could result in users reaching an unavailable host or receiving a certificate/ingress error.

This change provides a consistent canonical domain by redirecting www.$HUB_DOMAIN to $HUB_DOMAIN.

The redirect preserves the original path and query string, which is important for Hubs room and content URLs.

Examples

Before:

https://www.example.com/test-room?foo=bar

may not resolve correctly through the HCCE ingress.

After:

https://www.example.com/test-room?foo=bar

returns a 301 redirect to:

https://example.com/test-room?foo=bar

How to test

  1. Set the normal HCCE environment variables, including HUB_DOMAIN and Namespace.

  2. Generate the HCCE Kubernetes configuration using the existing generation process.

  3. Apply the generated HCCE configuration to a Kubernetes cluster.

  4. Confirm the new ingress exists:

    kubectl get ingress www-redirect -n "$Namespace"
    
  5. Confirm the redirect from the www hostname:

curl -I "https://www.$HUB_DOMAIN/"

Documentation of functionality

The functionality is contained in the HCCE deployment template and SSL script changes included in this pull request.

No separate documentation changes are required.

Limitations

The redirect assumes that DNS for www.$HUB_DOMAIN points to the HCCE deployment and that a valid certificate can be issued for the www hostname.

Alternative implementations considered

A fixed redirect location rule was considered, but that would redirect every request to the root URL and drop the original path.

Using HAProxy's redirect prefix behavior allows the original path and query string to be preserved.

Additional details or related context

The implementation uses the existing HCCE template variables and does not introduce deployment-specific domains or credentials.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Thank you for the pull request.

ROADMAP STATUS: This pull request isn't currently on any roadmap. Updates will be conveyed here as its place on/off a roadmap changes.

You can view the roadmaps here: Roadmaps Google Drive folder.

For more information on how the roadmaps work, see our roadmaps policy on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant