Adds get domain function.