: Google shows URLs for other countries when searching for my site by country I have a site that's available for different countries and the URL looks like: www.example.com/country The problem appears
I have a site that's available for different countries and the URL looks like: example.com/country
The problem appears when I look for my site and I want to look for a specific country. For example I want to search for France, so I Google "my site France". The first result is example.com/france, that's fine but then the second or third result is example.com/other_country and that's not correct and on the first result if it shows sections of my site, it shows for example the contact section as example.com/germany/contactus
The problem is that looking for a specific country it shows content designed for other countries.
More posts by @Shanna517
2 Comments
Sorted by latest first Latest Oldest Best
Use rel="alternate" hreflang="x" to tell Google which pages are for which locales.
In the head of every page which is duplicated for multiple locales, list the alternate pages with the relevant hreflang set:
<link rel="alternate" hreflang="x-default" href="http://example.com/" />
<link rel="alternate" hreflang="de" href="http://example.com/germany" />
Google is doing the right thing. It's actually doing what is in its program. I would better say change your website architecture by using geoIP:
Check that you have the mod_geoip module (GeoIP Extension) installed on your server.
Then, tweak your .htaccess file accordingly :
GeoIPEnable On
GeoIPDBFile /path/to/GeoIP.dat
# Start Redirecting countries
# Canada
RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^CA$
RewriteRule ^(.*)$ ca.abcd.com [L]
# India
RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^IN$
RewriteRule ^(.*)$ in.abcd.com [L]
# etc etc etc...
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.