Skip to content

404 on subdomains #32

Closed
Closed

Description

@nam-co

Hi Lukas, I found a little issue, I added 2 sites 'accounts.somesite.test' and 'somesite.test' but on accounts Im always getting 404, this could be the reason:

Herd links this project under the exact name accounts.somesite. A request for accounts.somesite.test matches that link before it could fall to the somesite site.
Flock has two rules that break this setup:
Site names can’t contain dots, so this project became accounts-somesite.test.
Every site also answers all of its subdomains. The somesite site therefore takes accounts.somesite.test, and Flock refused to give that name to this project (“already served by somesite”).

So your .env still says accounts.somesite.test, and in Flock that hostname reaches the front app, which has no /user/dashboard. Hence the 404.

The simplest alternative is to ask the Flock developers to let an exact site name win over a wildcard subdomain, which is what Herd does.

Please when you get a chance, it makes sense

Activity

  1. lukas-frey commented on Oct 19, 2026

    @lukas-frey
    Member

    Hi, thanks for the report, I'll look into it. Can you please further specify your directory structure so I can understnd the issue? You have 2 projects and one project's subdomain clashes with the other becuse of a similar name?

  2. added theissue type on Oct 19, 2026
  3. lukas-frey commented on Oct 19, 2026

    @lukas-frey
    Member

    If I understand it correctly:

    You have two projects:
    /somesite/
    /accounts.somesite/

    You either parked the parent folder or linked both projects. somesite.test serves /somesite/ -> this works.
    /accounts.somesite/ was assigned accounts-somesite.test domain, which you do not want and you'd prefer to use the old, accounts.somesite.test domain. So you wanted to add it as an alias for it to the /accounts.somesite/ site, but flock doesn't let you, because it is reserved as a wildcard subdomain for /somesite/

    Is that correct? :)

  4. nam-co commented on Oct 19, 2026

    @nam-co
    Author

    Hi Lukas , yes that is correct
    You have two projects:
    /somesite/ (this works ok)
    /accounts.somesite/ when I go to accounts.somesite.test/some-route I get a 404 because apparently is pointing behind the scene to somesite.text/some-route

  5. lukas-frey commented on Oct 19, 2026

    @lukas-frey
    Member

    The issue should be fixed in the next beta release, if you encounter any issues in the next beta, feel free to reopen or create a new issue

  6. nam-co commented on Oct 20, 2026

    @nam-co
    Author

    Hi Lukas good day, I updated to beta 11,but the 404 is still showing,
    I tried deleting them and adding them back but still 404/not found

  7. lukas-frey commented on Oct 20, 2026

    @lukas-frey
    Member

    Hi, hmm are you running on macos or windows?

  8. lukas-frey commented on Oct 20, 2026

    @lukas-frey
    Member

    So I tried to reproduce it on 1.0.0-beta.11 on my Mac again with somesite and accounts.somesite and it works on my
    end, both on http and https. Removing a site also removes its extra domains, so after adding them back you
    need to run flock domain add accounts.somesite.test in the accounts project again. Could you send the
    output of flock domain list? And let me know if you're on macos or windows :)

  9. nam-co commented on Oct 20, 2026

    @nam-co
    Author

    Lukas flock domain add accounts.somesite.test did the trick thank you (as a alias)

    just in case Im sending the list output, strangely doesn't include the front domain (somesite.test) but that one works
    macbookpro ~ ❯ flock domain list
    SITE DOMAIN STATUS
    accounts-somesite accounts.somesite.test https://accounts.somesite.test

    Every subdomain up to 4 levels below a site (and its aliases) resolves, extra domain or not.
    macbookpro ~ ❯

  10. added a commit that references this issue on Oct 23, 2026
    aaceda6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions