from django.contrib.sites.shortcuts import get_current_site domain = get_current_site(request).domain