var host = window.location.hostname; if(host == 'domain1.com' || host == 'domain2.com' || host == 'domain3.com') { //... }