Is it possible to use a 301 redirect for specific countries only?
For example, when mysite.com is clicked in Germany, it redirects to the new site.
However when mysite.com is clicked in the UK, it goes to the original site
Is that possible at all?
lammert
2:32 pm on Sep 15, 2010 (gmt 0)
You can achieve this if your site is based on a scripting language like PHP. With every page request your scripts first check the IP address of the visitor. Based on the country associated with that IP address a 301 header is generated, or the regular content of the page is displayed.
You don't need to maintain a list of IP address and country associations yourself. There are paid and free IP databases available which you can use from within your scripts. You should know that these databases are not 100% accurate so you may now and then redirect visitors erroneously. Also frequent updating of the database is necessary because new IP address blocks are handed out on a continuous base.
roaster200
2:39 pm on Sep 15, 2010 (gmt 0)
Ok great thanks. Can you tell me of the services that supply these databases?
lammert
2:49 pm on Sep 15, 2010 (gmt 0)
There are several services. You can find them with Bing or Google with search terms like country ip database.
roaster200
3:01 pm on Sep 15, 2010 (gmt 0)
great thanks mate
roaster200
10:04 am on Sep 16, 2010 (gmt 0)
I am wondering, is it possible to do the following:
When a person in Dubai search for a word, mysite.com shows No.1 in the SERPS, when that person clicks the link it redirects to mysite2.com
So what I am thinking, is that the redirect picks up the location from where the link has come from i.e. someone in dubai.
Is that possible?
roaster200
2:32 pm on Sep 20, 2010 (gmt 0)
bump
phranque
10:05 pm on Sep 20, 2010 (gmt 0)
you can certainly redirect based on referer (HTTP_REFERER), such as www.google.ae, or based on an IP (REMOTE_ADDR) of a visitor which location is known. for the latter you will need to use an IP geolocation database.
roaster200
7:45 am on Sep 21, 2010 (gmt 0)
ok great. I think the referer would work better. I will look into this. Any tips on where to look?
any specific redirect questions should be posted in the Apache Web Server [webmasterworld.com] forum.
roaster200
9:01 am on Sep 21, 2010 (gmt 0)
thank you very much for your time. I appreciate the help
roaster200
9:02 am on Sep 21, 2010 (gmt 0)
Quick question, I am correct in thinking this will still tell Google that the site has moved and help with SERPS. The old site ranks high and I want to pass that onto the new site
phranque
1:58 pm on Sep 21, 2010 (gmt 0)
in general, if you treat the crawler in the same way as you treat the search-referred visitor, you'll probably be ok. however you should be aware that any time you are cloaking you are playing with fire, so you need to know precisely what you are doing, why and how.
roaster200
2:03 pm on Sep 21, 2010 (gmt 0)
Its basically I am closing one site down and dont want to lose any traffic. I own both sites
phranque
2:18 pm on Sep 21, 2010 (gmt 0)
your question in the OP and the question i answered indicated a form of location-based cloaking.
roaster200
2:27 pm on Sep 21, 2010 (gmt 0)
I dont know what clocking is mate. Not sure what you mean