Internal path in twig template
The path() &amp; url() Drupal Twig functions expect a route name and will not work with a Drupal path. For a relative/absolute path to /contact, you can use path()/url() respectively with the contact.site_page route:

&lt;a href="{{ path('contact.site_page') }}"&gt;{{ 'Contact'|t }}&lt;/a&gt;    
&lt;a href="{{ url('contact.site_page') }}"&gt;{{ 'Contact'|t }}&lt;/a&gt;


If you don't know your route name, what you're looking for is link()

{{ link('Contact'|t, 'base:contact', { 'class':[] }) }}


See this d.o. page for more explanation about these 3 functions and their differences.