title: How to get exact origin domain address in javascript
body: <p>I am facing problem on getting origin domain address.
  I tried document.location, $location but no solution. It returns ip address instead of actual domain address.</p>
  
  <p>Finally i tried <strong>window.location.ancestorOrigins</strong>. it works in chrome and safari but does not for firefox and IE. it's showing undefined.
  The ip address mapping is done in godaddy(ip address forwarding).
  Can anyone help me.
  Thanks in advance.</p>