1

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 %}
    <div class="main-post">
        <a href="{{ entry.url }}">
            Entry Stuff...
        </a>
    </div>
{% endfor %}

How can I get rid of the $DEFAULT_SITE_URL ?

2

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.

| improve this answer | |

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.