---
title: Deploying MVC sites
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

After you finish development of a Kentico website, you typically need to deploy the site to a remote hosting server (production environment).

You can use the following process for the initial deployment:

1. Transfer your web project files from your local environment to the hosting server. You need to deploy both your MVC live site project and Kentico administration project.

   > **Tip:** **Tip**: There are several possible ways of deploying the project files, including copying over FTP or using the Visual Studio Publish function (with optional precompilation).
2. Ensure that both applications are registered and configured correctly in the hosting server's IIS. See also: [Manually configuring Kentico applications in IIS](https://docs.kentico.com/k12sp/installation/manually-configuring-kentico-applications-in-iis.md)
3. Deploy your Kentico database. You can choose between the following approaches:

   - Restore a database backup on your hosting SQL server, and manually update the connection string in the web.config file of both projects.\
     – OR –
   - Install a new database on your hosting SQL server and use the Kentico [Export/import feature](https://docs.kentico.com/k12sp/deploying-websites/exporting-and-importing-sites.md) to transfer the site:
     1. Delete the connection string from the web.config file of the deployed Kentico administration project.
     2. Open the **Sites** application on your local development instance and click **Export site** () next to the site that you want to deploy.
     3. Enter the name of the export package and go through the [Site export wizard](https://docs.kentico.com/k12sp/deploying-websites/exporting-and-importing-sites/exporting-sites.md).

        - The system saves the export package into the _\<web project>\CMS\CMSSiteUtils\\**Export**_ folder.
     4. Copy the exported package into the _\<web project>\CMS\CMSSiteUtils\\**Import**_ folder on the **hosting server**.
     5. Open the administration interface of the deployed administration project in a browser.
        - The application automatically opens the [Database installation wizard](https://docs.kentico.com/k12sp/installation/additional-database-installation.md).
     6. Create a new Kentico database on your hosting SQL server.
     7. At the end of the Database installation wizard, choose to import your existing site (from the previously exported package).
     8. Copy the new connection string from the web.config of the deployed administration project into the web.config of your MVC project.

> **Note:** **Database server time zones**
>
> If possible, use the same time zone for both your local environment and the production server hosting your database. Otherwise you may encounter time shift problems with the deployed data, for example in the settings of [scheduled tasks](https://docs.kentico.com/k12sp/configuring-kentico/scheduling-tasks.md).
>
> If you cannot synchronize the time zones, we recommend that you verify and reconfigure the timing settings of scheduled tasks after the deployment.

You may also need to adjust the site's settings for your production environment:

- Open the **Sites** application. Edit the site and make sure the [domain](https://docs.kentico.com/k12sp/configuring-kentico/managing-sites/setting-domain-names-for-sites.md), [presentation URL](https://docs.kentico.com/k12sp/configuring-kentico/managing-sites/setting-domain-names-for-sites.md#setting-the-domain-for-content-only-sites), and any domain aliases are configured correctly for the production domains.
- Open the **Settings** application and make sure your site settings contain correct values. For example, the **SMTP server** setting in the **System -> Emails** category (you may use a different SMTP server in your production environment).

Your site is now deployed. You can maintain the site and update its content by setting up [staging](https://docs.kentico.com/k12sp/deploying-websites/content-staging.md) or by manually deploying newer [import packages](https://docs.kentico.com/k12sp/deploying-websites/exporting-and-importing-sites.md).

## Running MVC websites on Microsoft Azure

You can run both your MVC application and the related Kentico administration application on [Microsoft Azure](https://docs.kentico.com/k12sp/deploying-websites/running-kentico-on-microsoft-azure.md).

The recommended approach is to deploy both applications as [Azure Web Apps](https://docs.kentico.com/k12sp/deploying-websites/running-kentico-on-microsoft-azure/running-kentico-in-azure-web-apps.md):

1. Use the [Kentico MVC](https://azure.microsoft.com/en-us/resources/templates/kentico-mvc-environment/) ARM ([Azure Resource Manager](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-overview)) template to prepare all resources required to host your environment in Azure.
2. [Deploy](https://docs.kentico.com/k12sp/deploying-websites/running-kentico-on-microsoft-azure/running-kentico-in-azure-web-apps/deploying-existing-mvc-projects-to-azure-web-apps.md) both applications into the prepared environment.
3. Make sure both applications are configured to use the same server time zone. See [Changing the server time zone on Azure Web Apps](https://blogs.msdn.microsoft.com/tomholl/2015/04/06/changing-the-server-time-zone-on-azure-web-apps/).

For a detailed walkthrough, see [Deploying existing MVC projects to Azure Web Apps](https://docs.kentico.com/k12sp/deploying-websites/running-kentico-on-microsoft-azure/running-kentico-in-azure-web-apps/deploying-existing-mvc-projects-to-azure-web-apps.md).
