Added window.location.origin if !exist