On a multilingual site, I'm using Domain Alias with the following two language-specific subdomains (as specified both in admin/config/regional/language and admin/structure/domain/view/1/alias):
German: de.foo.de
English: en.foo.de
So far, everything fine.

Using Domain Alias, I'm now trying to redirect de.foo.de to plain foo.de.
The result is that in the German locale I'm not able to log in anymore. de.foo.de correctly sends me to foo.de, however at foo.de, Drupal refuses to write a session cookie at all, no matter if I setcookie_domain to .foo.de or leave it commented out.

(Certainly, a session cookie de.foo.de wouldn't be helpful when immediately redirecting to foo.de. However, in combination with $cookie_domain this should work fine allowing me to use de.foo.de as a valid alias of foo.de for every path given. But let's leave that apart to reduce complexity at this point.)

The first approach would be that Domain Alias redirects too early, not allowing Drupal to write a cookie for de.foo.de.

A second approach would make Domain alias redirects take precedence over the Language domain specified in admin/config/regional/language, resulting in Drupal writing a cookie for foo.de instead.

While a workaround (and maybe the more straightforward solution) would be to rightaway specify foo.de instead of de.foo.de as Language domain in admin/config/regional/language, the other setup shouldn't lead to a tricky error.


Category:bug» support

The cookie should get written after the redirect, which, in effect, is a new page load.

I suspect this is a core limitation.