My main website store URL: test.website.in

Second website store URL : grocery.website.in

Initially, i developed multi-website in the localhost, and its working also but after move to live server main website working but second website store not working.

enter image description here


SetEnvIf Host grocery.website.in* MAGE_RUN_CODE=grocery
SetEnvIf Host grocery.website.in* MAGE_RUN_TYPE=website

Note : Followed this tutorial still facing issues.

3 Answers 3


Go to Content->Design->configurations

Click on edit link against your website.

apply a different them for each website. enter image description here

now run these commands.

php bin/magento setup:upgrade

php bin/magento setup:di:compile

php bin/magento setup:static-content:deploy -f

php bin/magento c:f

  • Yes, i set that before still getting the same issue and run commands what you mentioned snipboard.io/aHI6YF.jpg
    – zus
    Jul 22, 2020 at 11:33

set the cross-origin in app/etc/env.php by changing the following parameter.

'x-frame-options' => 'CROSS-ORIGIN',

after changing flush your magento cache

php bin/magento c:f

enter image description here

  • Still getting the same issue.
    – zus
    Jul 22, 2020 at 13:32
  • After set 'x-frame-options' => 'CROSS-ORIGIN', getting error => Cross-Origin Request Blocked: The Same Origin Policy disallows
    – zus
    Jul 23, 2020 at 5:45

You need to set up CSP in your website. Check this Magento CSP doc

Create csp_whitelist.xml in your module loading the second website inside etc folder

<?xml version="1.0"?>
<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp:etc/csp_whitelist.xsd">
        <policy id="font-src">
                <value id="your-test-website" type="host">test.website.in</value>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.