Custom Aliases not working
Try to add your alias array within one of your environment array such as:
&lt;?php

return [
    // Global settings
    '*' =&gt; [
        'aliases' =&gt; [
            '@rootUrl' =&gt; getenv('ROOT_URL'),
        ],
    ],

    // Dev environment settings
    'dev' =&gt; [
        // ...
    ],

    // Staging environment settings
    'staging' =&gt; [
        // ...
    ],

    // Production environment settings
    'production' =&gt; [
        // ...
    ],
];