Share Share on Facebook Share on Twitter Pinterest Email <script type=”text/javascript”> if ( document.domain.substring(0,4).toLowerCase() != ‘www.’ ) { window.location = document.URL.replace(“//”,“//www.”); } </script> 0 Siddharth Shukla Website Related Posts Change input value onclick button – pure javascript or jQuery June 17, 2020 how to redirect http to https using javascript August 24, 2018 Open URL in same window and in same tab July 28, 2018