title: Google API Error RefererNotAllowedMapError
body: <p>Im trying to create an application using the Google maps api. While running on my localhost the following code, it displays me in the console the following message:</p>
  
  <pre><code>"Google Maps API error: RefererNotAllowedMapError https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error
  Your site URL to be authorized: http://localhost:8888/fintechjobs.ie/fintechmap.php"
  
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;body&gt;
  
  &lt;div id="map" style="width:100%;height:500px"&gt;&lt;/div&gt;
  
  &lt;script&gt;
  function myMap() {
    var myCenter = new google.maps.LatLng(51.508742,-0.120850);
    var mapCanvas = document.getElementById("map");
    var mapOptions = {center: myCenter, zoom: 5};
    var map = new google.maps.Map(mapCanvas, mapOptions);
    var marker = new google.maps.Marker({position:myCenter});
    marker.setMap(map);
  }
  &lt;/script&gt;
  
  &lt;script src="https://maps.googleapis.com/maps/api/js?key=xxxxxxxxxxxxxxxx&amp;callback=myMap"&gt;&lt;/script&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Can someone guide on where is this error coming from?
  Thank you!</p>