Since your front routes are not fixed to a domain like the shop routes, the url
function uses the current domain, as every domain matches to this routes. Try to fix down your frontend routes:
example_front:
resource: "@MyFrontBundle/Controller/"
type: annotation
prefix: /
host: "example.com"