# Login failure in only one site in a multisite system

**URL:** https://meta.discourse.org/t/login-failure-in-only-one-site-in-a-multisite-system/373714
**Category:** Support
**Created:** [July 10, 2025, 9:51am UTC](https://meta.discourse.org/t/login-failure-in-only-one-site-in-a-multisite-system/373714 "2025-07-10T09:51:33Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![keithkhl](https://avatars.discourse-cdn.com/v4/letter/k/919ad9/32.png) [@keithkhl](https://meta.discourse.org/u/keithkhl)
#### Post date: [July 10, 2025, 9:51am UTC](https://meta.discourse.org/t/login-failure-in-only-one-site-in-a-multisite-system/373714/1 "2025-07-10T09:51:33Z")

</div>

I have one Discourse main site with 6 more subsites added to it, each with distinctive domain and DB.

Initially, I copied the main site’s DB to keep the consistency, and it works fine with the other 5 subsites.

For only one site, whenever I try to login,

- If it is via OIDC, I get “Sorry, the authorization timed out, or you have switched browsers. Please try again.” error on a blank screen
- If it is ID/PW, I get “Unknown error” on top of the ID/PW box

I even have copied the DB from working one to the new one, but it does not work.

Below is the multisite config, in case it helps.

```
     oneexample:
       adapter: postgresql
       database: oneexample
       username: adminexample
       password: pwexample
       host: 192.168.1.1
       port: 5432
       pool: 25
       timeout: 5000
       db_id: 5
       host_names:
         - 1example.com

```

The reason I chose ‘oneexample’ and ‘1example’ is because the domain contains a number at front. My only suspicion so far is that the number creates the problem, because copying back the DB to a working site without a number in domain name works fine.

One may say that I should choose a different domain, but this one is kinda expensive paid domain, and I would like to make it working.

I have removed browser cookies, purged login logs from the DB, and also have tried with other domain with the same database. All worked fine.

One potential solution in my mind that I have not tested is change the domain to a subdomain, just to replace the number at the front of domain address, like

- [1example.com](http://1example.com) =\> [discourse.1example.com](http://discourse.1example.com)

But, again, it loses the point of paying $$$ for this premium domain.

Do I look at the wrong place? Can there be any working solution?

---

<div class="post-metadata">

### Author: ![keithkhl](https://avatars.discourse-cdn.com/v4/letter/k/919ad9/32.png) [@keithkhl](https://meta.discourse.org/u/keithkhl)
#### Post date: [July 11, 2025, 2:41am UTC](https://meta.discourse.org/t/login-failure-in-only-one-site-in-a-multisite-system/373714/2 "2025-07-11T02:41:37Z")

</div>

tried with host\_names: [xxx.1example.com](http://xxx.1example.com) as well, but it gives the same error.

With the same database, I have successfully tried with a number of URLs without a number. It does seem related to the domain issue, but have no other clue.

---

<div class="post-metadata">

### Author: ![keithkhl](https://avatars.discourse-cdn.com/v4/letter/k/919ad9/32.png) [@keithkhl](https://meta.discourse.org/u/keithkhl)
#### Post date: [July 11, 2025, 6:45am UTC](https://meta.discourse.org/t/login-failure-in-only-one-site-in-a-multisite-system/373714/3 "2025-07-11T06:45:40Z")

</div>

From my Nginx’s location block,

```
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Forwarded-Proto $scheme;

```

I have removed the last line, as its function duplicates with the first two lines. Somehow, it seems that Discourse saw the login comes from http, instead of https.

I’ve also added below line in the app.yml, just to make sure that Discourse does attempt to login via https, and finally it works.

- DISCOURSE\_FORCE\_HTTPS: true

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [July 11, 2025, 7:13am UTC](https://meta.discourse.org/t/login-failure-in-only-one-site-in-a-multisite-system/373714/4 "2025-07-11T07:13:27Z")

</div>

So the main question is, how did it work for the other 5 subsites?

---

<div class="post-metadata">

### Author: ![keithkhl](https://avatars.discourse-cdn.com/v4/letter/k/919ad9/32.png) [@keithkhl](https://meta.discourse.org/u/keithkhl)
#### Post date: [July 11, 2025, 7:14am UTC](https://meta.discourse.org/t/login-failure-in-only-one-site-in-a-multisite-system/373714/5 "2025-07-11T07:14:49Z")

</div>

you got me on this one

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [August 10, 2025, 7:14am UTC](https://meta.discourse.org/t/login-failure-in-only-one-site-in-a-multisite-system/373714/6 "2025-08-10T07:14:58Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
