location.replace(edge+document.location.hash) problume

location.replace(edge+document.location.hash) problume

hi all friends i have a problume about location.replace
when i use http://  in var edge the location replace url but when i did not use the url will be a path 

exemple 
location.replace(edge+document.location.hash)

 var edge = http://google.com
the location replace to google.com

but when  i use var edge = google.com 
the url google.com will be a patch like this
site.com/google.com

i want  correct  to with http:// or not the lacation replace .
any solution ?