Multilang-Setup: different urls (.de/.com) leads to panel responding with: 'External URLs are not allowed for Panel redirects' in secondary language

Hey everyone,
so yeah, as described in the title I have a multi language setup with different urls .de/.com. Englisch (.com) is my primary language. Also the page is in a subdirectory. Accessing the panel from works fine. But when I try to access it from it throws the error. Any ideas on why this is or how it could be solved?

(There is a proxy involved in the server idk if that does anything bad. It already did with http→https redirect #4234 but seems unlikely here, since the .com/subfolder/panel works fine?)

edit: the error only shows after login :slight_smile:

thanks everyone!

Yes, I can reproduce this in my local environment. However, since Kirby is throwing this error, I think this is probably just not supported. Why would you have to call the Panel from the secondary language URL?

The error is thrown in /kirby/src/Panel/Home.php inside the url() method

// compare domains to avoid external redirects
if (static::hasValidDomain($uri) !== true) {
    throw new InvalidArgumentException('External URLs are not allowed for Panel redirects');


Checks if the given Uri has the same domainas the index URL of the Kirby installation. This is used to block external URLs to third-party domains as redirect options.

Well i just thought that it would be the expected behaviour and I just brought it up because I don’t want my client to run into errors. So I would just write a reroute in my config to avoid this?

Thanks for the explanation and the source! I just don’t quite understand why this would be a intended behaviour (I am just too slow I guess;)). Wouldn’t it be cool to login and already have the corresponding language selected in the backend?

You cannot override the panel/* routes in your config. You’d have to do this in your .htaccess or server configuration, i.e. before Kirby’s routing kicks in.

Well, I wrote “I think”, so I’m not 1000% sure this is intended behavior, so feel free to create an issue on GitHub to clarify.

will do when I find the time, thanks!