Google Maps Embedded API - Won't work without WWW in URL -


this question exact duplicate of:

i trying use google maps embedded api. have used years on page post every often. year wasn't working obtained new key , updated html on webpage. works if put "www" in front of page's url not if use domain name only. same page, adding www allows work. unfortunately, many of our users , documents refer our website without www.

i figured might google api key restriction "referrer". use hosted service, using "http referrers (web sites)". have tried both restriction turn off (and waiting 10 minutes) , of following in http referrers list (our domain though , again waiting 10 minutes):

*.example.com/*
*example.com*
*example.com/*

in both cases, works www.example.com/page.html , not example.com/page.html

any ideas?

if want redirect non-www requests site www version, need add following code .htaccess file:

rewriteengine on rewritecond %{http_host} !^www\. rewriterule ^(.*)$ http://www.%{http_host}/$1 [r=301,l]

this redirect requests tohttp://my-domain.com http://www.my-domain.com.

there several benefits doing that:

  • it avoid duplicate content in google

  • it avoid possibility of split page rank and/or split link popularity (inbound links).

  • it's nicer, , more consistent.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -