javascript redirect to domain root code example Example: js redirect to relative url window.location.href = '/path'; //relative to domain