<p>You probably have a misconfiguration in your environment variables - First go to the control panel and check what you have under Settings &gt; Sites &gt; [choose site] &gt; Base URL. If it's set to an env variable (i.e. it begins with a dollar sign), go to wherever you store your environment variables (e.g. the <code>.env</code> file, or maybe server env vars if you're on the remote), and check that you have a variable there with the expected value.</p>

CC BY-SA 4.0
2020-08-10T14:49:51.963Z
2020-08-10T14:49:51.963Z
James Smith
<p>I have an entry loop on my homepage that uses <code>{{ entry.url }}</code> that links to the full entry. When I click on the entry, the url looks like this</p>
<p><strong>mydomain.com/$DEFAULT_SITE_URL/the-entrys-slug</strong></p>
<p>Even though my section settings just has the Entry URI Format set to <code>{slug}</code></p>
<p>Here's my entry loop if you need it</p>
<pre><code>{% set aBetterPost = craft.entries.section('aBetterPost').limit('6').all() %}
{% for entry in aBetterPost %}
    &lt;div class=&quot;main-post&quot;&gt;
        &lt;a href=&quot;{{ entry.url }}&quot;&gt;
            Entry Stuff...
        &lt;/a&gt;
    &lt;/div&gt;
{% endfor %}
</code></pre>
<p><strong>How can I get rid of the $DEFAULT_SITE_URL ?</strong></p>

<craft3><entries><url>
Why is $DEFAULT_SITE_URL appearing in entries URL?
# Why is $DEFAULT_SITE_URL appearing in entries URL?

(Asked by: username_0 on 2020-08-10)

I have an entry loop on my homepage that uses {{ entry.url }} that links to the full entry. When I click on the entry, the url looks like this
mydomain.com/$DEFAULT_SITE_URL/the-entrys-slug
Even though my section settings just has the Entry URI Format set to {slug}
Here's my entry loop if you need it
{% set aBetterPost = craft.entries.section('aBetterPost').limit('6').all() %}
{% for entry in aBetterPost %}
    
        
            Entry Stuff...
        
    
{% endfor %}

How can I get rid of the $DEFAULT_SITE_URL ?

**Tags:** craft3, entries, url

---

## 1 answers

### Answer by username_1 on 2020-08-10. Score: 5 | Accepted answer

You probably have a misconfiguration in your environment variables - First go to the control panel and check what you have under Settings > Sites > [choose site] > Base URL. If it's set to an env variable (i.e. it begins with a dollar sign), go to wherever you store your environment variables (e.g. the `.env` file, or maybe server env vars if you're on the remote), and check that you have a variable there with the expected value.


---

