Return main domain if no domain is provide (closes #91)