# Going to production Learn more about preparing your customizations for production usage. When it's time to take your customization to production, you need to follow certain steps, such as building the production bundles and setting up the deployment. ## Configure the customization in the Merchant Center Configure a new customization in the Merchant Center by following these guides: - [Managing Custom Applications in the Merchant Center](https://docs.commercetools.com/merchant-center/managing-custom-applications.md) - [Managing Custom Views in the Merchant Center](https://docs.commercetools.com/merchant-center/managing-custom-views.md) This step is important to retrieve the customization identifier. ## Assign the customization identifier Provide the identifier that was generated when you configured the customization in the Merchant Center. - For Custom Applications: provide the Custom Application ID (`env.production.applicationId`) in the [Custom Application config](https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config.md#envproductionapplicationid). - For Custom Views: provide the Custom View ID (`env.production.customViewId`) in the [Custom View config](https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config.md#envproductioncustomviewid). ## Assign the production URL Provide the production URL (`env.production.url`) in your [Custom Application config](https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config.md#envproductionurl) or [Custom View config](https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config.md#envproductionurl). Even if the URL hasn't been set up yet, you can still assign the value in the configuration. ## Build production bundles The production bundles are created by running the CLI `build` command: ```console mc-scripts build ``` All the necessary static assets are created in the `public` directory. By default, the `build` command compiles the `index.html`, included in the `public` folder. You can opt-out of the compilation step by using the option `--build-only`. For more information, see the [`compile-html` command](https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/cli.md#compile-html). ## Deploy the production bundles Deploying and hosting customizations is managed by you. This allows you to choose whatever hosting solution works best for you. For more information, see our [Deployment overview](https://docs.commercetools.com/merchant-center-customizations/deployment/overview.md) page. ### Configure rewrite rules A customization is a Single-Page Application that uses client-side routing. Therefore, you need to instruct your hosting provider to rewrite all requests to serve the `index.html`. You can find examples in our [Deployment overview](https://docs.commercetools.com/merchant-center-customizations/deployment/overview.md) page which explains how to do that for each hosting provider. ### About Static Assets Depending on where you want to host your customization you might choose to keep the static assets (JS, CSS, etc.) in the same location as the `index.html` or to have them served by something like a CDN. If you choose to have them hosted in a separate location, you need to configure the CDN URL (`env.production.cdnUrl`) in your [Custom Application config](https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-application-config.md#envproductioncdnurl) or [Custom View config](https://docs.commercetools.com/merchant-center-customizations/tooling-and-configuration/custom-view-config.md#envproductioncdnurl). ## Finalize the customization setup Once the customization is hosted and the configuration is completed, you can move the customizations status to Ready. At this point, the customization is ready to be installed in the Merchant Center. For more information, see [Install a Custom Application](https://docs.commercetools.com/merchant-center/managing-custom-applications.md#install-a-custom-application) or [Install a Custom View](https://docs.commercetools.com/merchant-center/managing-custom-views.md#install-a-custom-view) in the Merchant Center documentation. ## Related pages - [Section overview page](https://docs.commercetools.com/merchant-center-customizations.md) - [Previous page: Adding TypeScript](https://docs.commercetools.com/merchant-center-customizations/development/adding-typescript.md)