> Site: https://www.google.com/search?q=js+get+domain > window.location.hostname 'www.google.com' > window.location.hostname.replace("www.","") 'google.com'