<p dir="auto">This is related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="10231365" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/6848" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/6848/hovercard" href="https://github.com/symfony/symfony/issues/6848">#6848</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="6623036" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/5424" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/5424/hovercard" href="https://github.com/symfony/symfony/issues/5424">#5424</a>. I am trying to use the host matching for changeing my routing resource by domain.</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="test:
    resource: &quot;routing.yml&quot;
    host:     &quot;my.first.domain&quot;

test2:
    resource: &quot;routing.yml&quot;
    host:     &quot;any.other.domain&quot;"><pre class="notranslate"><span class="pl-ent">test</span>:
    <span class="pl-ent">resource</span>: <span class="pl-s"><span class="pl-pds">"</span>routing.yml<span class="pl-pds">"</span></span>
    <span class="pl-ent">host</span>:     <span class="pl-s"><span class="pl-pds">"</span>my.first.domain<span class="pl-pds">"</span></span>

<span class="pl-ent">test2</span>:
    <span class="pl-ent">resource</span>: <span class="pl-s"><span class="pl-pds">"</span>routing.yml<span class="pl-pds">"</span></span>
    <span class="pl-ent">host</span>:     <span class="pl-s"><span class="pl-pds">"</span>any.other.domain<span class="pl-pds">"</span></span></pre></div>
<p dir="auto">This routing works well for "any.other.domain" but calling by "my.first.domain" I get a NotFoundHttpException. If I change the order of my entries to:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="test2:
    resource: &quot;routing.yml&quot;
    host:     &quot;any.other.domain&quot;

test:
    resource: &quot;routing.yml&quot;
    host:     &quot;my.first.domain&quot;"><pre class="notranslate"><span class="pl-ent">test2</span>:
    <span class="pl-ent">resource</span>: <span class="pl-s"><span class="pl-pds">"</span>routing.yml<span class="pl-pds">"</span></span>
    <span class="pl-ent">host</span>:     <span class="pl-s"><span class="pl-pds">"</span>any.other.domain<span class="pl-pds">"</span></span>

<span class="pl-ent">test</span>:
    <span class="pl-ent">resource</span>: <span class="pl-s"><span class="pl-pds">"</span>routing.yml<span class="pl-pds">"</span></span>
    <span class="pl-ent">host</span>:     <span class="pl-s"><span class="pl-pds">"</span>my.first.domain<span class="pl-pds">"</span></span></pre></div>
<p dir="auto">it works well for "my.first.domain" but "any.other.domain" is broken now. Is there a way to get around this problem?</p>
<p dir="auto">Currently running into an issue with the new host matching when I'm trying to generate urls that requires me to pass in a host parameter.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="InternalUserController:
    resource: &quot;@ApiBundle/Controller/Internal/UserController.php&quot;
    type: annotation
    host: &quot;api.{domain}&quot;

DashboardController:
    resource: &quot;@DashboardBundle/Controller/DashboardController.php&quot;
    type: annotation
    host: &quot;{domain}&quot;"><pre lang="ymal" class="notranslate"><code class="notranslate">InternalUserController:
    resource: "@ApiBundle/Controller/Internal/UserController.php"
    type: annotation
    host: "api.{domain}"

DashboardController:
    resource: "@DashboardBundle/Controller/DashboardController.php"
    type: annotation
    host: "{domain}"
</code></pre></div>
<p dir="auto">The examples above work perfectly with the url matcher, but when needing to generate the url, it will require me to provide the domain parameter each time. I know this is how it's suppose to function, but it seems a bit annoying to require putting in the domain each time.</p>