The imaginary numbers are often presented on a real-imaginary graph where the imaginary numbers are on the vertical axis.
A function that has imaginary numbers would have a domain that consists a range of numbers on the horizontal axis. Since the horizontal axis represents real numbers, hence the domain of the function (providing there's no limitation) is all the numbers on the horizontal axis