[GH-ISSUE #1243] [Feature Request] Support Multiple Domains per Resource with Primary Domain Redirect Option #3767

Closed
opened 2026-04-20 07:52:21 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @mgasche on GitHub (Aug 8, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/1243

Originally assigned to: @oschwartz10612, @Pallavikumarimdb on GitHub.

It would be very useful to have the ability to assign multiple domains to a single resource in Pangolin.

Currently, a resource seems to be tied to a single domain.
This limits flexibility when a service should be accessible via multiple domains or subdomains.


Proposed Feature

Add support for specifying multiple domains for a given resource, along with a setting to determine how Pangolin should handle requests to these domains.

Two modes could be available:

  1. Primary Domain Redirect Mode

    • One domain is marked as the primary.
    • All requests to any other assigned domain are redirected to the primary domain via HTTP 301 (permanent redirect).
    • Ensures canonical URLs and SEO consistency.
  2. Multi-Domain Mode

    • All assigned domains serve the same resource directly.
    • No redirects are performed; each domain remains independently accessible.

Benefits

  • SEO control: Primary domain redirection prevents duplicate content issues.
  • Brand flexibility: Serve content under multiple brand domains without creating duplicate configurations.
  • Simplified configuration: Manage all domains for a resource in one place rather than duplicating resources.
  • Subdomain preference: Especially useful for cases like example.ch and www.example.ch, allowing one of them to be declared as the primary domain while redirecting the other.
Originally created by @mgasche on GitHub (Aug 8, 2025). Original GitHub issue: https://github.com/fosrl/pangolin/issues/1243 Originally assigned to: @oschwartz10612, @Pallavikumarimdb on GitHub. It would be very useful to have the ability to assign **multiple domains** to a single resource in Pangolin. Currently, a resource seems to be tied to a single domain. This limits flexibility when a service should be accessible via multiple domains or subdomains. --- ### Proposed Feature Add support for specifying **multiple domains** for a given resource, along with a setting to determine how Pangolin should handle requests to these domains. Two modes could be available: 1. **Primary Domain Redirect Mode** - One domain is marked as the **primary**. - All requests to any other assigned domain are redirected to the primary domain via **HTTP 301** (permanent redirect). - Ensures canonical URLs and SEO consistency. 2. **Multi-Domain Mode** - All assigned domains serve the same resource directly. - No redirects are performed; each domain remains independently accessible. --- ### Benefits - **SEO control:** Primary domain redirection prevents duplicate content issues. - **Brand flexibility:** Serve content under multiple brand domains without creating duplicate configurations. - **Simplified configuration:** Manage all domains for a resource in one place rather than duplicating resources. - **Subdomain preference:** Especially useful for cases like `example.ch` and `www.example.ch`, allowing one of them to be declared as the primary domain while redirecting the other.
GiteaMirror added the enhancement label 2026-04-20 07:52:21 -05:00
Author
Owner

@Pallavikumarimdb commented on GitHub (Aug 12, 2025):

This is similar to the request in #906 (2.2 Multiple Hostnames for a Single Resource).
I’m already working on that issue, so this feature will be addressed as part of that implementation.

<!-- gh-comment-id:3180080756 --> @Pallavikumarimdb commented on GitHub (Aug 12, 2025): This is similar to the request in #906 (2.2 Multiple Hostnames for a Single Resource). I’m already working on that issue, so this feature will be addressed as part of that implementation.
Author
Owner

@eggman9713 commented on GitHub (Aug 15, 2025):

This will be very useful for applications where I can only configure one domain for a resource on a client but it needs to function both inside the network and outside. For resource.domain.com, a local DNS record will capture that request and reroute it back inside the network but it will work through Pangolin on the outside. If I need to go from inside the network through Pangolin and back (usually just for testing purposes), using a subdomain like remote.resource.domain.com that local DNS won't capture will be excellent.

<!-- gh-comment-id:3192736707 --> @eggman9713 commented on GitHub (Aug 15, 2025): This will be very useful for applications where I can only configure one domain for a resource on a client but it needs to function both inside the network and outside. For resource.domain.com, a local DNS record will capture that request and reroute it back inside the network but it will work through Pangolin on the outside. If I need to go from inside the network through Pangolin and back (usually just for testing purposes), using a subdomain like remote.resource.domain.com that local DNS won't capture will be excellent.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 30, 2025):

This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.

<!-- gh-comment-id:3238756280 --> @github-actions[bot] commented on GitHub (Aug 30, 2025): This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.
Author
Owner

@miloschwartz commented on GitHub (Sep 27, 2025):

Thanks, converting this to a discussion thread so others can upvote and participate!

<!-- gh-comment-id:3342079584 --> @miloschwartz commented on GitHub (Sep 27, 2025): Thanks, converting this to a discussion thread so others can upvote and participate!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#3767