Ensure all users visit the canonical host

Is it application behaviour or upstream of the application? I'd argue the domain is upstream.