Incorrectly configured APP_URL

In Shopware 6, the administration as well as some extensions require the correct URL to the store. The external URL to the store is defined via the environment variable APP_URL.

Error message:

Incorrectly configured APP_URL

Extensions cannot connect to your store due to a misconfiguration in your system.
in your system. Contact your hoster to get help.




Troubleshooting:

To correct the error, the APP_URL in the environment variables must be corrected. The file for the environment variables is located above the root directory (document root) of your store domain.


Example:

/var/www/vhosts/shop-domain.com/httpdocs
├── bin
├── composer.json
├── composer.lock
├── config
├── custom
├── Dockerfile
├── dummy
├── easy-coding-standard.php
├── .env
├── .env.local <-- Environment variables
├── files
├── index.html
├── install.lock
├── license.txt
├── phpstan.neon
├── phpunit.xml.dist
├── PLATFORM_COMMIT_SHA
├── psalm.xml
├── public <-- root directory (document root)
├── README.md
├─── src
├── sw.js.html
├── var
└── vendor


Open the .env.local file with a text editor of your choice and search for the value:

APP_URL=https://www.wrong-shop-domain.com


Check whether the specified APP_URL is actually accessible via the Internet and leads to one of your sales channels. You can also use our DNS lookup tool to check the resolution of the domain.


Correct the value for APP_URL and then save the file.

Then reload the Shopware Administration. If the APP_URL resolves correctly, no new error will be displayed.


Tip: The Shopware cache does not have to be emptied by this adjustment.