The sites not switch in Kentico 13 Admin Multi-sites

Jane Yu asked on September 7, 2023 05:03

Hello, I created two sites one is dancing goat core site, another is dev1 site, both are mvc core. I tried to edit pages for dev1 site, so I click pages, then tried to switch to dev1 site, however, it always switched back to dancing goat site. So I have to stop dancing goat site, then I can switch to my dev1 site. So I would like to is this properly way to do things or I have to setup something to make switch site work? I am new for Kentico, it took me two weeks to set the sites properly. It's very painful experience. I hope someone can help me for this. Thanks very much.

Correct Answer

Juraj Ondrus answered on September 8, 2023 06:48

I would recommend using totally different URLs for the admin. I do not think Kentico takes the port into account and still thinks you are editing the first site. Set the admin URLs to be clearly distinguishable:
cmsdev1.xxx.xxx
cmsdev2.xxx.xxx

0 votesVote for this answer Unmark Correct answer

Recent Answers


Juraj Ondrus answered on September 7, 2023 10:26

Where and how are you hosting the front end apps? Are you using one .NET Core app for both sites or, each site has its own project? Also, what is set as the administration domain name and presentation URL for each site?
Moreover, the general practice and recommendation is to have one site per Kentico instance. Multiple sites is doable, but you also need to configure IIS properly - separate site for admin app and separate sites for front end apps.

0 votesVote for this answer Mark as a Correct answer

Jane Yu answered on September 7, 2023 15:02

Hi Juraj, Each site has their own project. I have dev1 site with cname dev1.xxx.xxx, and dancing goat site is on local host http://localhost:54499, the admin url is cmsdev.xxx.xxx My admin site and .net core sites are have their own site. Thanks,

0 votesVote for this answer Mark as a Correct answer

Jane Yu answered on September 7, 2023 15:40

Hi Juraj, the admin site url for the sites: one is cmsdev.xxx.xxx, another one is cmsdev.xxx.xxx:443(It was automatically when I added the second site). I also have question for this too: if I want to add third site on the same instance, what the presentation url for admin site? Thanks,

0 votesVote for this answer Mark as a Correct answer

Jane Yu answered on September 7, 2023 17:02

Hi Juraj, I created cname for dancing goat site too. dev1 site: URL dev1.xxx.xxx, admin url: cmsdev.xxx.xxx dev2 site: url dev2.xxx.xxx (this is dancing goat site), admin url: cmsdev.xxx.xxx:443. However I still got same thing: when I switched the site from dev2 to dev1, it automatically switched back to dev2 when I tried to edit pages for dev1 site. Thanks Jane

0 votesVote for this answer Mark as a Correct answer

Jane Yu answered on September 8, 2023 17:23

Hi Juraj, Thanks very much for your help. I want to get confirmation from you that I need create two admin sites (cmsdev1.xxx.xxx, cmsdev2.xxx.xxx but both sites are point to the same admin folder, the physical folder)?

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on September 11, 2023 05:30

No, you can have one IIS site but with two different bindings. So Kentico can distinguish what site's data to load based on the domain name.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.