• You are losing out on amazing benefits because you are not a member. Join for free. Register now.
  • Big Two-Day Giveaway - Win an Amazon Kindle, a Mystery Gadget and Branded Gear. Enter Here.
  • Test your broadband speed and win prizes worth R5,000. Enter here.

Forcing Google Services to local (RSA) IP address


Executive Member
Feb 18, 2009
As some of you might have seen: Google, YouTube and Facebook are hosting local mirrors for most of their services.
Unfortunately the ISP's DNS servers doesn't always report the local IP addresses, even if the services work on the local mirrors!

There are 2 ways in which you can force the Google, YouTube & Facebook to work on local cap:
  1. Forcing the hostnames to a fixed IP address with the use of the hosts file, which can be found in the %windir%\system32\drivers\etc folder.
    Pros: very easy and quick to setup
    Cons: doesn't support wildcards or multiple hostnames, which is why the list is so massive
    * Instructions at the bottom
    * NEW!!: There's a hosts file modification specific to YouTube viewers on the SAIX network too - see bottom of post
    * NEW #2!!: There are also hosts file modifications for Google views on WebAfrica network - see Tinuva's post
  2. Running your own DNS server with the use of BIND9 and then overriding the hostnames using wildcards.
    Pros: supports regular expressions (wildcards); 1 server can be used for multiple PC's; would override more Google & YouTube services (Facebook zone not added yet); this technique works on some routers too
    Cons: the setup takes a couple of minutes to do and might seem like its for advanced users
    * Instructions can be found on my blog: http://mybroadband.co.za/vb/entry.p...n-Windows-for-accessing-local-Google-services

Modifying the hosts file can be done like follow:
  1. Run: notepad %windir%\system32\drivers\etc\hosts
    ^^ Its really as simple as pressing Windows Key + R, typing in notepad %windir%\system32\drivers\etc\hosts and pressing Enter
    If you don't understand that, then you can open notepad, browse to c:\windows\system32\drivers\etc folder and then open the file with the name hosts
  2. Here's the list that you'll have to add to the bottom of the hosts file:
    # Thanks goes to Catal, HavocXphere, Blogbytes & fragtion_ for contributing hostnames
    # On SAIX:
    # <Google IP> =
    # <YouTube IP> =
    # <Facebook IP> = / /
    # On IS:
    # <Google IP> =
    # <YouTube IP> = / / /
    # <Facebook IP> = / / /
    # Google Searching
    <Google IP> www.google.co.za
    <Google IP> www.google.com
    <Google IP> google.com
    <Google IP> google.co.za
    # Gmail and chat withing Gmail
    <Google IP> mail.google.com
    <Google IP> chatenabled.mail.google.com
    # Google Code & Pada's Traffic Splitter Google Code address
    <Google IP> www.gmodules.com
    <Google IP> traffic-splitter.googlecode.com
    <YouTube IP> www.googlecode.com
    <YouTube IP> code.google.com
    # Blogspot
    <Google IP> www.blogspot.com
    <Google IP> bp0.blogger.com
    <Google IP> bp1.blogger.com
    <Google IP> bp2.blogger.com
    <Google IP> bp3.blogger.com
    <Google IP> 0.bp.blogspot.com
    <Google IP> 1.bp.blogspot.com
    <Google IP> 2.bp.blogspot.com
    <Google IP> 3.bp.blogspot.com
    <Google IP> 4.bp.blogspot.com
    <Google IP> image.blogspot.com
    <Google IP> buttons.blogger.com
    <Google IP> upload.blogspot.com
    <Google IP> googleappengine.blogspot.com
    <Google IP> www.blogger.com
    <Google IP> www.blogblog.com
    <Google IP> img1.blogblog.com
    <Google IP> img2.blogblog.com
    <Google IP> www1.blogblog.com
    <Google IP> www2.blogblog.com
    # Google Eath & Google Maps
    <Google IP> maps.google.co.za
    <Google IP> maps.google.com
    <Google IP> csi.gstatic.com
    <Google IP> maps.gstatic.com
    <Google IP> gg.google.com
    <YouTube IP> kh.google.com
    <YouTube IP> mw1.google.com
    <YouTube IP> mw2.google.com
    <YouTube IP> earth.google.com
    <YouTube IP> mt0.google.com
    <YouTube IP> mt1.google.com
    <YouTube IP> mt2.google.com
    <YouTube IP> mt3.google.com
    <YouTube IP> khm.google.com
    <YouTube IP> cbk0.google.com
    <YouTube IP> cbk1.google.com
    <YouTube IP> cbk2.google.com
    <YouTube IP> cbk3.google.com
    # Other Google Services
    <Google IP> news.google.com
    <Google IP> blitz.appspot.com
    <Google IP> www.google-analytics.com
    <Google IP> ssl.google-analytics.com
    <Google IP> t0.gstatic.com
    <Google IP> t1.gstatic.com
    <Google IP> t2.gstatic.com
    <Google IP> t3.gstatic.com
    <Google IP> www.gstatic.com
    <YouTube IP> books.google.co.za
    <YouTube IP> books.google.com
    <YouTube IP> calendar.google.com
    <YouTube IP> video.google.com
    <YouTube IP> translate.google.com
    <YouTube IP> docs.google.com
    <YouTube IP> appengine.google.com
    <YouTube IP> clients1.google.com
    <YouTube IP> clients2.google.com
    <YouTube IP> clients3.google.com
    <YouTube IP> clients4.google.com
    <YouTube IP> clients5.google.com
    <YouTube IP> id.google.com
    <YouTube IP> dl.google.com
    # YouTube
    <Google IP> ad-emea.doubleclick.net
    <Google IP> s.ytimg.com
    <Google IP> webcache.googleusercontent.com
    <YouTube IP> youtube.co.za
    <YouTube IP> youtube.com
    <YouTube IP> www.youtube.co.za
    <YouTube IP> www.youtube.com
    <YouTube IP> www.youtube-nocookie.com
    <YouTube IP> i1.ytimg.com
    <YouTube IP> i2.ytimg.com
    <YouTube IP> i3.ytimg.com
    <YouTube IP> i4.ytimg.com
    <YouTube IP> upload.youtube.com
    # Facebook
    <Facebook IP> www.facebook.com
    <Facebook IP> static.ak.fbcdn.net
    <Facebook IP> profile.ak.fbcdn.net
    <Facebook IP> upload.facebook.com
  3. Replace (please make use of the Replace... [CTRL + H] function) the <Google IP>, <YouTube IP> and <Facebook IP> with the correct IP address, which I've given at the top of the list.
    If I've specified multiple IP addresses, using a / to separate them, please just pick one random one from the list.
    Please use the IP addresses according to your local ISP: SAIX/IS !
  4. Save the file and exit notepad. You don't need to restart for it to take effect.

If you're having trouble with either a Google, YouTube of Facebook page, then I would appreciate it if you can give me as much information as possible:
  • Overriding method that you're using
  • ISP account name
  • URL that's not working on local cap
  • ping results to the hostname specified by the URL (for intermediate/advanced users)
  • the DNS server's IP address that you're using (for intermediate/advanced users)

  • Overriding method: hosts file
  • ISP account name:Mweb consumer uncapped
  • URL: https://mail.google.com/mail/?shva=1
  • Ping results:
    C:\Users\xxx>ping mail.google.com
    Pinging googlemail.l.google.com [] with 32 bytes of data:
    Reply from bytes=32 time=366ms TTL=47
    Reply from bytes=32 time=365ms TTL=47
    Reply from bytes=32 time=366ms TTL=47
    Reply from bytes=32 time=369ms TTL=47
    Ping statistics for
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 365ms, Maximum = 369ms, Average = 366ms
  • DNS Server IP address:

A few notes when forcing the Google services to the local IP address:
  1. I haven't managed to get Google Talk working yet
  2. I found Google Earth to be quite slow

Here are the results of people trying to ping www.google.co.za without forcing it to the local IP address: http://mybroadband.co.za/vb/showthread.php?241552-Your-help-needed-Please-ping-www.Google.co.za

If you've found more cool Google services that are mirrored locally, please contribute :)

Hosts file modification specifically for YouTube viewers on SAIX network:
http://pastebin.com/ra85gsiW * Thank Fragtion for this
If you're to cheap to have international bandwidth left to even view that, you can download the contents here: http://www.quickshare.co.za/files/kyq9it0k/YouTube-SAIX-31Aug2010.txt.html
Last edited:


Senior Member
Nov 2, 2005
Shweet. Hopefully I'll try it out tonight.

At least now I can use more of that local cap that goes wasted.


Expert Member
Apr 3, 2006
Quick question regarding gmail

@ Mr Pada

Why after adding the Gmail ips did mine stop working after 1 day, i only login to my TK accounts using my router (NO Dialing up as such) and only the search works however i am adding the google earth stuff now into my localhosts file to see if those work aswell.

Rather odd but i will test further otherwise thanks soo much for showing us how to do this :)


I removed the previous line i created and re-added the above lines and it seems to be working, maybe a dns issue no idea but its working :)
Last edited:


Executive Member
Feb 18, 2009
Yuu, thats strange that you've had trouble with it.

If you've set these static DNS entries on the router, then ensure that you clear your PC's DNS cache.
In Windows you can do that by running: ipconfig /flushdns


Expert Member
Apr 3, 2006
Thanks Pada, for now its working well but i will continue to test as the weeks go by :)

This thread should be stickied already :)


Executive Member
Feb 18, 2009
One thing that I forgot to mention, which you might run into, is the invalid X.509 certificate error that Firefox/IE would warn you about.
So far I've only had this issue with Google Code (when trying to upload to SVN) and not when accessing Gmail.


Well-Known Member
Sep 8, 2008
Updated list with Youtube

This is great news, thx pada. We love Google! :love:

I've added a few more hosts to get stuff like maps and images working. Some of the youtube video's also work, e.g. http://www.youtube.com/watch?v=lz55TaFKNZw&feature=channel . I haven't been very elegant in collecting the host names, some might even be wrong, so I'm sure your lists look much more impressive than mine :D I use Telkom DoBroadband1 with only local cap left.

# Google Searching www.google.co.za www.l.google.com www.google.com

# Gmail and chat withing Gmail mail.google.com chatenabled.mail.google.com

# Google Code & Pada's Traffic Splitter Google Code address code.google.com traffic-splitter.googlecode.com www.gmodules.com

# Google Earth kh.google.com kh.l.google.com csi.gstatic.com csi.l.google.com mw1.google.com mw2.google.com mw-small.l.google.com mw-medium.l.google.com earth.google.com

# Google Services books.google.co.za calendar.google.com video.google.com news.google.com translate.google.com docs.google.com

# Google Appengine blitz.appspot.com appengine.google.com www.google-analytics.com ssl.google-analytics.com

# Blogspot googleappengine.blogspot.com www.blogger.com

# Google Handling Servers clients0.google.com clients1.google.com clients2.google.com clients3.google.com id.google.com dl.google.com t0.gstatic.com t1.gstatic.com t2.gstatic.com t3.gstatic.com www.gstatic.com

# Google Maps maps.google.co.za maps.google.com mt0.google.com mt1.google.com maps.gstatic.com khm.google.com gg.google.com cbk0.google.com cbk1.google.com cbk2.google.com cbk3.google.com

# Youtube (Just testing) www.youtube.com www.youtube.co.za youtube-ui.l.google.com s.ytimg.com www.youtube-nocookie.com pagead0.googlesyndication.com pagead1.googlesyndication.com pagead2.googlesyndication.com pagead3.googlesyndication.com webcache.googleusercontent.com 0.tqn.com ad-emea.doubleclick.net i0.ytimg.com i1.ytimg.com i2.ytimg.com i3.ytimg.com i4.ytimg.com csi.google.com


Executive Member
Feb 18, 2009
Wow Catal, your list is massive. Thanks for your effort, as I'm sure many would love to make use of it :D
I would certainly test a few of those.

The Google Analytics one would be very useful for me, since many local sites use it for tracking users.
Last edited: