dynamic host parsing based on query params