How to redirect Kentico to CMS admin page by default

Clemons Cantrell asked on November 20, 2020 07:48

We're using Kentico 11 along with a single MVC website, both hosted as Azure app services. Our company's URL looks like www.mycorp.com and Kentico CMS URL looks like kentico.mycorp.com When someone goes to kentico.mycorp.com, it shows a blank page. We need to type kentico.mycorp.com/admin to get to the CMS. Is there a way a redirect can be set up without adding any new DNS entry or a web app in IIS Omegle?

Recent Answers


Brian McKeiver answered on November 20, 2020 17:37 (last edited on November 20, 2020 17:41)

Even though the docs say 12, I think this approach should still work for you in v11.

https://docs.xperience.io/k12sp/developing-websites/starting-with-mvc-development/adding-an-administration-redirect-to-mvc-sites

If they hit the raw domain on your admin site itself, you can use a rewrite rule in your admin tool's web.config file.

<configuration>
..
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="AdminRedirect" stopProcessing="true">
          <match url="^$" />
          <action type="Redirect" url="/admin" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
..
</configuration>
0 votesVote for this answer Mark as a Correct answer

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