Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-20-2008, 08:13 PM
danlefree's Avatar
WebProWorld Member
 

Join Date: Jun 2005
Location: Seattle
Posts: 67
danlefree RepRank 0
Default Correct response code for GeoIP forwarding between domains?

I'm putting together a fairly simple script which will send visitors to the correct domain (.com versus .co.uk) based upon their IP address' entry in the MaxMind GeoIP Lite .CSV and I'd like to play nice with Google, Yahoo, and MSN.

I'm presently redirecting as follows:

PHP Code:
header 'HTTP/1.1 301 Moved Permanently' );
header 'Location: http://www.domain.com/' ); 
I am not aware of any HTTP response codes which are intended for geolocation-based redirection, so I'm open to suggestion if 301 - Moved Permanently could be improved upon.
__________________
- Dan LeFree
Dan LeFree Consulting
Reply With Quote
  #2 (permalink)  
Old 01-21-2008, 10:52 AM
wige's Avatar
Moderator
WebProWorld Moderator
 

Join Date: Jun 2006
Location: United States
Posts: 1,843
wige RepRank 4wige RepRank 4wige RepRank 4wige RepRank 4
Default Re: Correct response code for GeoIP forwarding between domains?

You can combine the two lines:

PHP Code:
header ('Location: http://www.domain.com/'301); 
Just to cut down on parser overhead.

As far as I know, Geolocation was not built into the HTTP specification, and the only codes that exist for redirection are 301 and 302. However, use of the 301 redirect could have the potential of impacting the indexing of the page doing the redirection. If the spider sees a 301, not only could you risk a red flag if bots from some IP addresses are redirected and others aren't, but the original page may not be indexed at all. The spider typically expects that if redirection is occurring, all users will be sent to the destination of the 301, so link weight will be passed through the redirect, and the redirection target can replace the original page in the index.

I don't have to much experience setting these types of redirects up, but I am sure someone else will be able to provide some ideas of possible workarounds that would avoid these issues.
__________________
The best way to learn anything, is to question everything.
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Yahoo Store domain forwarding - multiple domains?? chowell Yahoo! Discussion Forum 1 04-12-2007 01:25 AM
What's the correct code for 'global.js'? nozzmoking Web Programming Discussion Forum 2 08-23-2006 12:16 PM
The Correct way to forward multiple domains to your site. Robban Search Engine Optimization Forum 5 09-09-2005 06:23 PM
MaxMind GeoIP dwirken Search Engine Optimization Forum 1 07-05-2004 10:29 PM
Get Response-Autoresponder ms_promoqueen Web Programming Discussion Forum 0 03-03-2004 09:51 AM


Search Engine Optimization by vBSEO 3.2.0