What you are "probably" asking is how to prepend the correct base URL to your manual built URL, i.e. something like this:
a href="{{ app.request.baseUrl }}/contact"
or if you need the FQDN URL:
a href="{{ app.request.getSchemeAndHttpHost() }}/contact"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…