Reputation: 67
I am working with MY website http://www.indianapolisairport.com. I am going to work with google api key, actually am working with local host only. When I am going to get the api key that google asks url. I am just confused what url I have to give. Is it either my site or my localhost url ? can any one tell me?
Upvotes: 0
Views: 821
Reputation: 2316
I believe I understand what you're trying to achieve.
From my understanding, you are developing for the domain www.indianapolisairport.com, and you currently have the website on the domain localhost as your staging/development version. When Google API keys are created a domain is required (i.e. the "My website URL field"), and so you're wondering how you can test your site on localhost, but be able to go live later with the API key already integrated.
My usual approach is to hack my HOST file to include that domain on my local machine, so I can avoid any domain related issues later. I'm not sure what OS you're using, but there is a decent explanation here:
http://www.jakeludington.com/windows_7/20100827_how_do_i_edit_hosts_file_in_windows_7.html
In this case you would want to use something like:
127.0.0.1 www.indianapolisairport.com indianapolisairport.com
Assuming you are using Apache with the default site set as localhost, running the command "ipconfig /flushdns" (on Windows) would clear your DNS resolver cache. Once you restarted your browser, you should then be able to view the site on your computer at this address. You would then need to remove this from your host file and flush your DNS resolver cache again to check the site once it is online.
Russell, with all due respect I feel you are being a little bit critical. I have encountered this problem numerous times and it makes sense to me what Iavan is asking.
Upvotes: 1