ÃÛ¶¹ÊÓÆµ

[PaaS only]{class="badge informative" title="Applies to ÃÛ¶¹ÊÓÆµ Commerce on Cloud projects (ÃÛ¶¹ÊÓÆµ-managed PaaS infrastructure) and on-premises projects only."}

Checklist for setting up a new domain

This checklist explains how to set up a new domain in ÃÛ¶¹ÊÓÆµ Commerce on cloud infrastructure. It applies whether you’re adding a new domain or replacing the current one. It also applies after getting a new Staging environment (see Step 4).

Affected products and versions

ÃÛ¶¹ÊÓÆµ Commerce on cloud infrastructure,

How to set up a new domain

Step 1 - Is this for the Integration, Staging, or Production environment?

Step 2 - Staging environment: are you on Pro or Starter?

NOTE
You can add the new domain to Fastly yourself by updating the configuration in the Admin in Stores > Configuration > Advanced > System > Full Page Cache > Fastly Configuration > Domains as in Manage domains in our user guide.
If you are unable to add the domain, it could be due to one of these reasons:
  1. You are migrating the domain to the cloud environment, which has been configured in your own Fastly service. In this case, submit a request and request delegation of the domain.
  2. You are migrating the domain from Starter to Pro. In this case, submit a request for further assistance.
  • Starter: Custom domains are not supported on the Staging environment.

Step 3 - Production environment: are you on Pro or Starter?

  • Pro: Submit a request to add the domain to Fastly, Nginx, and configure the SSL certificate (as the Sendgrid domain, if necessary). Once that has been configured, continue to Step 4.
NOTE
You can add the new domain to Fastly yourself by updating the configuration in the Admin in Stores > Configuration > Advanced > System > Full Page Cache > Fastly Configuration > Domains Manage domains in our user guide.
If you are unable to add the domain, it could be due to one of these reasons:
  1. You are migrating the domain from on-premises to the cloud environment, which has been configured in your own Fastly service. In this case, submit a request and request delegation of the domain.
  2. You are migrating the domain from Starter to Pro. In this case, submit a request for further assistance.
  • Starter: Add the domain to your project in the Domains tab, then submit a request to provide the ACME Challenge Key for the SSL certificate.

Step 4 - Is the domain live?

Step 5 - Are domain redirects configured in magento-vars.php?

After the domain has been configured, you need to modify the variables in the magento-vars.php file to direct the domain to the appropriate website/store URL.

Step 6 - Is the domain configuration verified?

If you have added new stores, store groups, and websites in Stores > Settings > All Stores for the new domain(s), check whether the following sections appear in your app/etc/config.php file, for example:

'scopes' => [
    'websites' => [
        'admin' => [
            'website_id' => '0',
            'code' => 'admin',
            'name' => 'Admin',
            'sort_order' => '0',
            'default_group_id' => '0',
            'is_default' => '0',
        ],
        'base' => [
            'website_id' => '1',
            'code' => 'base',
            'name' => 'Main Website',
            'sort_order' => '0',
            'default_group_id' => '1',
            'is_default' => '1',
        ],
        'site2' => [
            'website_id' => '2',
            'code' => 'site2',
            'name' => 'Second Website',
            'sort_order' => '0',
            'default_group_id' => '2',
            'is_default' => '0',
        ],
    ],
    'groups' => [
        0 => [
            'group_id' => '0',
            'website_id' => '0',
            'name' => 'Default',
            'root_category_id' => '0',
            'default_store_id' => '0',
            'code' => 'default',
        ],
        1 => [
            'group_id' => '1',
            'website_id' => '1',
            'name' => 'Main Website Store',
            'root_category_id' => '2',
            'default_store_id' => '1',
            'code' => 'main_website_store',
        ],
        2 => [
            'group_id' => '2',
            'website_id' => '2',
            'name' => 'Second Website Store',
            'root_category_id' => '2',
            'default_store_id' => '2',
            'code' => 'site2store',
        ],
    ],
    'stores' => [
        'admin' => [
            'store_id' => '0',
            'code' => 'admin',
            'website_id' => '0',
            'group_id' => '0',
            'name' => 'Admin',
            'sort_order' => '0',
            'is_active' => '1',
        ],
        'default' => [
            'store_id' => '1',
            'code' => 'default',
            'website_id' => '1',
            'group_id' => '1',
            'name' => 'Default Store View',
            'sort_order' => '0',
            'is_active' => '1',
        ],
        'site2sv' => [
            'store_id' => '2',
            'code' => 'site2sv',
            'website_id' => '2',
            'group_id' => '2',
            'name' => 'Second Website Store view',
            'sort_order' => '0',
            'is_active' => '1',
        ],
    ],
]

This means that you have set up SCD on Build by running the config:dump command in the ece-tools package in the past.

If you find that the new store/website you’ve created isn’t showing in the app/etc/config.php file, make sure to run the command again to sync the config.php file with the changes to your database, then commit the config.php file and redeploy. This is to facilitate static content deployment for the new store/website(s) to the appropriate file paths.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a