// in same tab: window.location.replace('https://www.google.com') // in new tab: window.open('https://www.google.com', '_blank');