You can't rely on it, but you can try the request.META['REMOTE_HOST'] or request.META['HTTP_HOST'] from the META dictionary of the request :
A standard Python dictionary containing all available HTTP headers. Available headers depend on the client and server, but here are some examples:
- REMOTE_HOST -- The hostname of the client.
- HTTP_HOST -- The HTTP Host header sent by the client.
http://stackoverflow.com/questions/13093951/django-get-clients-domain-name-host-name