extract domain and sub domain