How to Change Google Country Redirect in Firefox
This article discusses about how to change Google country redirect to whatever your want from firefox permanently.
The problem: When I’m using Google search at my office, it get automatically redirected to google.co.jp site. But I’m living in Sri Lanka and can’t read Japanese at all. The correct site for me should be google.lk. If you have used a proxy server that’s not in your country, you might have experienced the same.
One way to stop Google country redirect is to visit this link.
This sets a cookie in your browser announcing Google not to redirect. Now you are getting results from google.com. But this solution fails if you remove cookies in Firefox. And the other problem is that you’ll not get country-specific search features.
Ok, here is my solution.
Firefox’s default search bar gets its configuration options (what search engine to use, what parameters to pass, etc) from XML files located in ’searchplugins’ directory in Firefox’s default directory. If you are on a Windows system this most probably be ‘C:Program FilesMozilla Firefoxsearchplugins’. There’s an XML file for Google called ‘google.xml’. Following is the content of that file.
1 2 3 4 5 6 7 8 | Google Google Search UTF-8 <img alt="" width="16" height="16" />data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAaRJREFUeNpiVIg5JRURw0A0YAHio943kYV%2B%2Ff33%2BdvvX7%2F%2FMjEx8nKycrGzwKXOiPKzICvdeezLhCV3jp15%2Bfv%2FX0YGhv8MDDxMX2qKTIw0RK10eYD6QYqATvoPBkt3f5K0W9Ew4fjTFz%2F%2Bw8Dm3W8UPeZxqFa%2BevsFyD0twgfVsOfkRxHrtfV9u5BVQ8Crd98%2FffkGYQM1QJ20%2FfSPv79eNxQGYfpSVJADmcvEAHbr7oOX2dj%2FERNKIA2%2F%2F%2Fz%2FxfCDhYVoDUDw5P6vf9%2B5iY0HVmZGQWm%2BN3fff%2Fn2k4eLHS739x%2FDiRs%2Ff%2F%2F5x8HO%2FOHzN3djfqgNjIwMgc6qzLx%2Fpy47j2zY%2Feff06tXhOUucgxeun33AUZGpHh4%2Bvo7t8EyIJqz%2FhpasD59%2B5dNrqdnznZIsEL9ICXCsWuBCwvTv%2FymS5PWPP32ExEALz%2F%2BB5r848cPCJcRaMP9xaYQzofPPzfuvrnj0Jst%2B5%2F8%2Bc4sLPeDkYlRgJc93VPE18NIXkYUmJYQSQMZ%2FP3379uPH7%2F%2F%2FEETBzqJ0WqLGvFpe2LCC4AAAwAyjg7ENzDDWAAAAABJRU5ErkJggg%3D%3D <!-- Dynamic parameters --> http://www.google.com/firefox |
XML tags hare are self-explanatory. First copy google.xml and make a new one. Lets’ call it ‘google.lk.xml’ for examples. Then Edit ‘ShortName’, tag and rename it to something else. Let’s call is “Google.lk”. Then there are two ‘Url’ tags. Leave the first ‘Url’ tag as it is since it’s used to get search suggestions. In the second tag change template attribute to template=http://www.google.lk/search.
Change http://www.google.com/firefox to http://www.google.lk. This specifies the page to display if you click on the magnifying glass icon, at the left hand corner of the search bar, without any search terms.
After these changes are made, new google.lk.xml file should look like follows.
1 2 3 4 5 6 7 8 | Google.LK Google.LK Search UTF-8 <img alt="" width="16" height="16" />data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAaRJREFUeNpiVIg5JRURw0A0YAHio943kYV%2B%2Ff33%2BdvvX7%2F%2FMjEx8nKycrGzwKXOiPKzICvdeezLhCV3jp15%2Bfv%2FX0YGhv8MDDxMX2qKTIw0RK10eYD6QYqATvoPBkt3f5K0W9Ew4fjTFz%2F%2Bw8Dm3W8UPeZxqFa%2BevsFyD0twgfVsOfkRxHrtfV9u5BVQ8Crd98%2FffkGYQM1QJ20%2FfSPv79eNxQGYfpSVJADmcvEAHbr7oOX2dj%2FERNKIA2%2F%2F%2Fz%2FxfCDhYVoDUDw5P6vf9%2B5iY0HVmZGQWm%2BN3fff%2Fn2k4eLHS739x%2FDiRs%2Ff%2F%2F5x8HO%2FOHzN3djfqgNjIwMgc6qzLx%2Fpy47j2zY%2Feff06tXhOUucgxeun33AUZGpHh4%2Bvo7t8EyIJqz%2FhpasD59%2B5dNrqdnznZIsEL9ICXCsWuBCwvTv%2FymS5PWPP32ExEALz%2F%2BB5r848cPCJcRaMP9xaYQzofPPzfuvrnj0Jst%2B5%2F8%2Bc4sLPeDkYlRgJc93VPE18NIXkYUmJYQSQMZ%2FP3379uPH7%2F%2F%2FEETBzqJ0WqLGvFpe2LCC4AAAwAyjg7ENzDDWAAAAABJRU5ErkJggg%3D%3D <!-- Dynamic parameters --> http://www.google.lk |
If you are in a different country than Sri Lanka, use your country’s Google domain instead of google.lk.
Finally, you have to select “Google.lk” from the search engine list in Firefox (Click on the small traigle next to Google’s logo, ‘G’)
Dharshin



















2 Comments on “How to Change Google Country Redirect in Firefox”
Great post! I’ll subscribe right now wth my feedreader software!
You know, I don’t read blogs. But yours is really worth beeing read.