Panel in Subdomain Redirects to Panel in Main Domain

I have setup a Kirby site on a domain - let’s say “example.com” - and now the client wants me to setup a second Kirby site on a subdomain - let’s say “sub.example.com”. I’ve setup the second site, and it displays correctly on the frontend. But when I try to access the Panel for the subdomain, it redirects me automatically to the Panel for the main domain!

To explain in simpler terms, this is what’s happening, step by step:

  1. in my browser, I type “http://sub.example.com/panel”, and…

  2. …the browser goes to “http://example.com/panel/login:confused:

Is there something I need to change somewhere, that I’ve missed? Any guidance would be greatly appreciated!

Are both Kirby installations in different project folders? Have you tried to set the URL in your config.php?

@texnixe you’re totally right: it was the URL option in the config. I had set up the URL option in the main domain site, and when I copied the site I (stupidly) forgot to change the setting… Doh!

Thank you so much for your help. You’re worth GOLD!!! :+1: