I am using {{ siteUrl }} for absolute links. It works 95% of the time. But if I press the reload button multiple times in a few seconds (overloading or something) my links look like this:


instead of


other Twig commands are working fine at the same time. What's happening?


Try using {{ currentSite.baseUrl }}

I had the same issue when I started using environment variables instead of @web for my sites. I've found the above works for all cases.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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