mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #6721] [Question]: using multi domain name to panel login. #4479
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#4479
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Matin4359 on GitHub (Oct 3, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6721
What are you trying to do?
Hi, using multi domain name to panel login, possible?
What have you already tried?
No response
3x-ui version
3.9.0
How did you install 3x-ui?
install.sh script
Operating system
No response
Screenshots or config snippets
No response
Before submitting
@github-actions[bot] commented on GitHub (Oct 3, 2026):
Yes. To open the panel on several domain names, leave
Listen Domainempty and point all of your domains (DNS A/AAAA records) at the server. With the field empty, the panel accepts requests for any host name. If you set it, the panel accepts only that one exact host name.Why
Panel Settings → General → Listen Domain(setting keywebDomain) holds a single host name, not a list. When it is set, the panel installs a middleware that rejects every otherHostwith HTTP 403:internal/web/web.go:189-191internal/web/middleware/domainValidator.goSo you cannot enter several domains there (for example comma-separated), because the whole string is compared to the request host as is. The field's own description says the same thing: "leave blank to listen on all domains and IPs" (
internal/web/translation/en-US.json:1266).If you use HTTPS on the panel
The panel loads exactly one certificate/key pair (
Panel Certificate Public Key File Path/Private Key File Path;tls.LoadX509KeyPair(certFile, keyFile)ininternal/web/web.go:622). To avoid browser warnings on every domain, that certificate must cover all of them. That means a multi-domain (SAN) certificate or a wildcard certificate, issued with all names included.Steps
Panel Settings → General, clearListen Domain, save, and restart the panel.server_name/ site block instead.Some other features read
webDomainas the panel's public host. For example, the subscription host falls back to it whensubDomainis empty (internal/sub/service.go:266). If you clear it and want subscription links to show a fixed domain, set the subscriptionReverse Proxy URI. The subscription's ownListen Domainwould also limit the subscription server to that single host.Verdict: Not a bug (expected behaviour). This is a usage question:
Listen Domainaccepts one host, and leaving it empty allows all domains.This reply was generated automatically; a maintainer may follow up.
@Matin4359 commented on GitHub (Oct 3, 2026):
Yea I know, but I can't figure out how to resolve the certificate problem. for direct connection, not proxy like Cloudflare.