15

For what is "downloadable_domains" in env.php file? I have read on Magento dev docs, but I can`t understand where it is used? Please do not add links to dev docs. Describe please your point of view. Thanks in advance!

1
  • I am facing the issue like (Link URL's domain is not in list of downloadable_domains in env.php) which is solved by doing this suggestion Thank you very much :) Commented Jan 19, 2023 at 12:47

1 Answer 1

26

When you are creating Downloadable Product(s), you are setting a link/url to download particular File/Resource.

enter image description here

The domain name of this link/url must be white-listed and to do so, you need to add this domain name in env.php file under "downloadable_domains".

Listing the CLI commands to manage "downloadable_domains" :

To add a domain :

bin/magento downloadable:domains:add www.mydomain.com

To remove a domain :

bin/magento downloadable:domains:remove www.mydomain.com

To list all whitelisted domains :

bin/magento downloadable:domains:show
1

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.