diff --git a/src/Umbraco.Core/Services/DomainService.cs b/src/Umbraco.Core/Services/DomainService.cs index c527e40b8240..58f776a45a56 100644 --- a/src/Umbraco.Core/Services/DomainService.cs +++ b/src/Umbraco.Core/Services/DomainService.cs @@ -311,12 +311,17 @@ private IDomain[] CalculateNewAssignedDomains(int contentId, DomainsUpdateModel var sortOrder = 0; foreach (DomainModel domainModel in updateModel.Domains) { - IDomain assignedDomain = currentlyAssignedDomains.FirstOrDefault(domain => domainModel.DomainName.InvariantEquals(domain.DomainName)) - ?? new UmbracoDomain(domainModel.DomainName) - { - LanguageId = languageIdByIsoCode[domainModel.IsoCode], - RootContentId = contentId - }; + IDomain? assignedDomain = currentlyAssignedDomains.FirstOrDefault(domain => domainModel.DomainName.InvariantEquals(domain.DomainName)); + + // If we do not have an assigned domain, or the domain-language has been changed, create new domain. + if (assignedDomain is null || assignedDomain.LanguageId != languageIdByIsoCode[domainModel.IsoCode]) + { + assignedDomain = new UmbracoDomain(domainModel.DomainName) + { + LanguageId = languageIdByIsoCode[domainModel.IsoCode], + RootContentId = contentId + }; + } assignedDomain.SortOrder = sortOrder++; newAssignedDomains.Add(assignedDomain);