<p>Use the alias instead <code>{{ alias('@web') }}</code></p>

<p>It will always point to your <code>web</code> directory </p>

CC BY-SA 4.0
2018-07-20T10:27:36.740Z
2018-07-20T10:27:36.740Z
Robin Schambach
<p>Up till now, all my craft sites were single language. When including CSS and JS files from <code>web</code> folder, i used to use <code>{{siteUrl}}</code> variable, like this:</p>

<pre><code>&lt;script src='{{siteUrl}}/plugins/jquery.js'&gt;&lt;/script&gt;
</code></pre>

<p>Such path was rendered to this:</p>

<pre><code>&lt;script src='http://website.com/plugins/jquery.js'&gt;&lt;/script&gt;
</code></pre>

<p>Unfortunetly, on multilanguage websites, where different languages have different url path (site.com and site.com/en), <code>{{siteUrl}}</code> variable changes and paths to these files are incorrectly rendered, like this:</p>

<pre><code>&lt;script src='http://website.com/en/plugins/jquery.js'&gt;&lt;/script&gt;
</code></pre>

<p>What variable can i use that will give me path to web folder - regardless of currently used language?</p>

<multi-site>
Including CSS and JS files on multilanguage sites
# Including CSS and JS files on multilanguage sites

(Asked by: username_0 on 2018-07-20)

Up till now, all my craft sites were single language. When including CSS and JS files from web folder, i used to use {{siteUrl}} variable, like this:


Such path was rendered to this:


Unfortunetly, on multilanguage websites, where different languages have different url path (site.com and site.com/en), {{siteUrl}} variable changes and paths to these files are incorrectly rendered, like this:


What variable can i use that will give me path to web folder - regardless of currently used language?

**Tags:** multi-site


---

## 1 answers

### Answer by username_1 on 2018-07-20. Score: 3 | Accepted answer

Use the alias instead `{{ alias('@web') }}`

It will always point to your `web` directory


---

