Mapped domain redirects to the main domain.

The domain mapping does not work when I try to map a subsite to a domain.