# Domain missing from some requests after migration from subfolder back to subdomain

**URL:** https://meta.discourse.org/t/domain-missing-from-some-requests-after-migration-from-subfolder-back-to-subdomain/253556
**Category:** Support
**Tags:** subfolder
**Created:** [January 31, 2023, 6:42pm UTC](https://meta.discourse.org/t/domain-missing-from-some-requests-after-migration-from-subfolder-back-to-subdomain/253556 "2023-01-31T18:42:27Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Magnetidog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/magnetidog/32/116910_2.png) [@Magnetidog](https://meta.discourse.org/u/Magnetidog)
#### Post date: [January 31, 2023, 6:42pm UTC](https://meta.discourse.org/t/domain-missing-from-some-requests-after-migration-from-subfolder-back-to-subdomain/253556/1 "2023-01-31T18:42:28Z")

</div>

Hello guys,

I have a Discourse installation which was living in a subdirectory and has now been moved to a subdomain. Everything seems to be working now, but we have a pending problem where Discourse calls the “theme-javascripts” domain instead of a subdirectory.

Latest Discourse version.

How can we solve this?

Thanks.

 ![Capture2](https://global.discourse-cdn.com/meta/original/4X/e/8/a/e8af539fc3ac6c468bc64db2130fcf021a379621.png)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [January 31, 2023, 7:36pm UTC](https://meta.discourse.org/t/domain-missing-from-some-requests-after-migration-from-subfolder-back-to-subdomain/253556/2 "2023-01-31T19:36:34Z")

</div>

Did you follow [Serve Discourse from a subfolder (path prefix) instead of a subdomain](https://meta.discourse.org/t/serve-discourse-from-a-subfolder-path-prefix-instead-of-a-subdomain/30507) backward?

Can you share your URL?

---

<div class="post-metadata">

### Author: ![Magnetidog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/magnetidog/32/116910_2.png) [@Magnetidog](https://meta.discourse.org/u/Magnetidog)
#### Post date: [January 31, 2023, 7:39pm UTC](https://meta.discourse.org/t/domain-missing-from-some-requests-after-migration-from-subfolder-back-to-subdomain/253556/3 "2023-01-31T19:39:27Z")

</div>

Jay, I did - not my first rodeo doing this, either, in the past without issues. The new URL is (hiding URL).

Do note: a designer is currently working on the style, so you might see weird things happening in the navigation, right now.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [January 31, 2023, 7:44pm UTC](https://meta.discourse.org/t/domain-missing-from-some-requests-after-migration-from-subfolder-back-to-subdomain/253556/4 "2023-01-31T19:44:14Z")

</div>

I see, something is referencing

```
https://theme-javascripts/44e23af3ca6cf81f41e66da02a80e1c9b45653cc.js?__ws=community.windowcleaner.com

```

instead of

```
https://community.windowcleaner.com/theme-javascripts/44e23af3ca6cf81f41e66da02a80e1c9b45653cc.js?__ws=community.windowcleaner.com

```

Maybe there is something left in your `app.yml` that’s referring to. . . hmm. . . something (like maybe a “/”) that’s making it add the https to the front?

---

<div class="post-metadata">

### Author: ![Magnetidog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/magnetidog/32/116910_2.png) [@Magnetidog](https://meta.discourse.org/u/Magnetidog)
#### Post date: [February 1, 2023, 1:54am UTC](https://meta.discourse.org/t/domain-missing-from-some-requests-after-migration-from-subfolder-back-to-subdomain/253556/5 "2023-02-01T01:54:41Z")

</div>

Indeed, that is what is happening - trying several rebuilds, no luck yet. If I manage to find out I will update the thread!

---

<div class="post-metadata">

### Author: ![Magnetidog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/magnetidog/32/116910_2.png) [@Magnetidog](https://meta.discourse.org/u/Magnetidog)
#### Post date: [February 11, 2023, 8:29pm UTC](https://meta.discourse.org/t/domain-missing-from-some-requests-after-migration-from-subfolder-back-to-subdomain/253556/6 "2023-02-11T20:29:24Z")

</div>

Still no luck with this one! I narrowed it down to code that comes from the official plugins - I will update this if I find a solution.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [February 11, 2023, 9:00pm UTC](https://meta.discourse.org/t/domain-missing-from-some-requests-after-migration-from-subfolder-back-to-subdomain/253556/7 "2023-02-11T21:00:09Z")

</div>

Is your `hostname` blank somewhere?

What’s the value of `DISCOURSE_HOSTNAME:` in app.yml?

---

<div class="post-metadata">

### Author: ![Magnetidog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/magnetidog/32/116910_2.png) [@Magnetidog](https://meta.discourse.org/u/Magnetidog)
#### Post date: [February 12, 2023, 1:15am UTC](https://meta.discourse.org/t/domain-missing-from-some-requests-after-migration-from-subfolder-back-to-subdomain/253556/8 "2023-02-12T01:15:14Z")

</div>

Hey @merefield, not blank - the value is (hiding URL). But I suspect the same, or something along those lines, as the theme-javascript is being called with two slashes in front of it. I wonder if it could be some value in the database which was not updated after the move from the subdirectory. Trying to look into that.

---

<div class="post-metadata">

### Author: ![Magnetidog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/magnetidog/32/116910_2.png) [@Magnetidog](https://meta.discourse.org/u/Magnetidog)
#### Post date: [February 12, 2023, 3:18am UTC](https://meta.discourse.org/t/domain-missing-from-some-requests-after-migration-from-subfolder-back-to-subdomain/253556/9 "2023-02-12T03:18:31Z")

</div>

I think I fixed it - all I had to do was a remap; not sure how that wrong URL was there in the first place, as the error appeared after a rebuild that was not done by me.

Anyhow, this is what I did to fix this:

```plaintext
> ./launcher enter app
> discourse remap //theme-javascripts /theme-javascripts
> Rewriting all occurrences of //theme-javascripts to /theme-javascripts
> THIS TASK WILL REWRITE DATA, ARE YOU SURE (type YES)
> YES
> theme_fields=4
> Done

```

Hope this helps somebody else in the future.

---

<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: [March 14, 2023, 8:00pm UTC](https://meta.discourse.org/t/domain-missing-from-some-requests-after-migration-from-subfolder-back-to-subdomain/253556/12 "2023-03-14T20:00:13Z")

</div>

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