Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.
Thread: [How To] Block Ads in MobilSafari
is a discussion within theiPhone News
forums, a part of theGeneral iPhone
section;I don't know about most of the over 300,000 of you registered members, but I live in Chicago and spend a lot of time in transit to and fro via
...-
09-18-2008, 02:34 AM #1iPhone? More like MyPhone
- Join Date
- Jul 2007
- Location
- chicago
- Posts
- 127
- Thanks
- 4
- Thanked 34 Times in 7 Posts
[How To] Block Ads in MobilSafari

I don't know about most of the over 300,000 of you registered members, but I live in Chicago and spend a lot of time in transit to and fro via Chicago's public transportation system – CTA. Now, there are a lot of things I could be doing during this time – blogging for MMi (hey, that's actually the full name now – how cute), colorizing comics for my other job, or, God forbid, some homework, but more often than not I'm reading different websites, following the almighty Obama, or worshiping at the feet of Steve. Even with my Mach Five-esque 16GB on 3G there is one thing that always slows me down – ads.
While I was digging around today on the tubes that are the web, I found James's blog post about ad blocking in MobileSafari, 2.0+. Then I found a couple of guys (on a forum we can't link to for legal reasons) who've found out how to block A LOT more ads you'll encounter while surfing with your phone. The process to get this going is ridiculously easy and should be completely painless:
Step One
SSH over to your iPhone (this may work on an iPod Touch as well, but I do not have one to test with, nor do the people who edited this file) and navigate to /etc
Step Two
copy the file called hosts over to your computer for safekeeping(I recommend sticking it right next to your backed up MobileInstallation file and your custom firmware)
Step Three
replace the hosts file on your iPhone with the one provided here – the permissions should already be set right, assuming whatever you decompress the zip with doesn't jack with them. If you'd like to be very sure, chmod 644 the file before you replace the original on the phone.
Step Four
reboot
Step Five
Surf ad-free until Apple updates the firmware again, at which point you'll probably have to do this again.
For those curious to how this works, a very extensive list of address to block have been added to the hosts file and when MobileSafari is instructed to load them when you visit a page it, well, doesn't.
If you find some other address to block, follow the format in the file and add them.
-
The Following 24 Users Say Thank You to ajustcircle For This Useful Post:
461am (09-18-2008), creolesoul (10-04-2008), elr0y7 (09-18-2008), jrentzke (09-18-2008), KingLuc (09-19-2008), Knolly (09-18-2008), koolksmart (09-18-2008), lehighkid (01-17-2009), Marecki (09-18-2008), mlsaint78 (10-03-2008), NakedFaerie (09-18-2008), number johnny 5 (01-17-2009), OneRing2Rule (10-01-2008), oo3 (09-18-2008), oscar25 (09-18-2008), ProjectGSX (09-18-2008), qnc (09-19-2008), redeyez69 (09-18-2008), SharpieBandit (09-20-2008), Sixtey7 (09-18-2008), tattoojack (09-18-2008), uvbisani (09-19-2008), Zimoxx (01-03-2009)
-
09-18-2008, 02:41 AM #2
awesome! thankx
-
The Following User Says Thank You to warfa For This Useful Post:
koolksmart (09-18-2008)
-
09-18-2008, 03:28 AM #3I'm not a star
- Join Date
- Jul 2007
- Location
- MI, USA
- Posts
- 2,441
- Thanks
- 92
- Thanked 164 Times in 143 Posts
Sweet...
And it will be like a taco inside a taco within a Taco Bell that's inside a KFC that's within a mall that's inside your dream! Springboard screwy after reboot? Here is the fix
-
The Following User Says Thank You to Imahottguy For This Useful Post:
koolksmart (09-18-2008)
-
09-18-2008, 03:37 AM #4
That's a nice extensive list - thanks!
[edit]
Well, it seems BigBoss doesn't like this new adblock host file. If you now try & load Categories, it stops with a screen complaining :
Permissions Error
Admob blocking has been detected in your hosts file. I have worked many hours on this app. It cannot run with this block in place.
I tried commenting the line out that contained admob, but categories still wouldn't load. I had to delete that line.
This is the line: 127.0.0.1 mm.admob.com
So even though we thought this fix was only for ads in Safari, it also seems to effect anyone using ads in their apps...and bigboss won't have that!Last edited by jrentzke; 09-18-2008 at 04:37 AM.
-
The Following 2 Users Say Thank You to jrentzke For This Useful Post:
elr0y7 (09-18-2008), koolksmart (09-18-2008)
-
09-18-2008, 06:25 AM #5
Been doing this for over a week now. Had to remove admon.com line from host for categories.
-
The Following User Says Thank You to Nefarious For This Useful Post:
koolksmart (09-18-2008)
-
09-18-2008, 07:15 AM #6
BigBoss is one of the best devs on Cydia. I respect his choice and erased the line.
-
The Following User Says Thank You to bbplayer5 For This Useful Post:
koolksmart (09-18-2008)
-
09-18-2008, 07:24 AM #7My iPhone is a Part of Me
- Join Date
- Nov 2007
- Location
- Los Angeles
- Posts
- 815
- Thanks
- 417
- Thanked 108 Times in 80 Posts
good job, great write up. thanks given!

-
The Following User Says Thank You to tattoojack For This Useful Post:
koolksmart (09-18-2008)
-
09-18-2008, 07:31 AM #8iPhone? More like MyPhone
- Join Date
- Jul 2008
- Location
- right in the middle of the US
- Posts
- 140
- Thanks
- 4
- Thanked 7 Times in 5 Posts
so does this affect other programs, like cycorder?
-
The Following User Says Thank You to ksiphone For This Useful Post:
koolksmart (09-18-2008)
-
09-18-2008, 07:36 AM #9My iPhone is a Part of Me
- Join Date
- Jun 2007
- Location
- Arizona
- Posts
- 829
- Thanks
- 44
- Thanked 115 Times in 85 Posts
almighty ObamaI write Mac only tutorials for the iPhone and own every model. My iPhones run on the following SIMs/networks: AT&T, GoPhone, H2O, O2, SimpleMobile, T-Mobile and Verizon.
-
The Following 3 Users Say Thank You to exNavy For This Useful Post:
koolksmart (09-18-2008), Kyle Matthews (09-18-2008), SharpieBandit (09-20-2008)
-
09-18-2008, 08:14 AM #10
-
The Following 2 Users Say Thank You to smoketx For This Useful Post:
koolksmart (09-18-2008), uvbisani (09-19-2008)
-
09-18-2008, 08:36 AM #11Livin the iPhone Life
- Join Date
- Aug 2007
- Location
- Toronto, Canada
- Posts
- 3,308
- Thanks
- 12
- Thanked 562 Times in 483 Posts
-
The Following User Says Thank You to Eurisko For This Useful Post:
koolksmart (09-18-2008)
-
09-18-2008, 08:52 AM #12
-
The Following User Says Thank You to marcoiac For This Useful Post:
koolksmart (09-18-2008)
-
09-18-2008, 09:36 AM #13
-
The Following User Says Thank You to jimbeam4581 For This Useful Post:
koolksmart (09-18-2008)
-
09-18-2008, 10:01 AM #14
hell yeah obama ftw
anyway, thanks for the great tip
-
The Following User Says Thank You to skatertrash For This Useful Post:
koolksmart (09-18-2008)
-
09-18-2008, 10:19 AM #15iPhoneaholic
- Join Date
- May 2008
- Location
- Beaverton, OR
- Posts
- 470
- Thanks
- 89
- Thanked 61 Times in 48 Posts
Not sure why, but I don't see any ads being blocked after doing this.
*EDIT*
nvm...i guess it depends on what sites i go to.Last edited by oo3; 09-18-2008 at 10:23 AM.
-
The Following User Says Thank You to oo3 For This Useful Post:
koolksmart (09-18-2008)
-
09-18-2008, 12:04 PM #16Owner / Founder - ModMyi
aka poetic_folly
- Join Date
- May 2007
- Location
- Tampa, Florida, United States
- Posts
- 8,351
- Thanks
- 529
- Thanked 4,565 Times in 1,158 Posts
spam above. I'll delete when I get to my comp if a mod doesn't beat me to it.
eidt: got it for ya
-
09-18-2008, 12:07 PM #17
cycorder doesn't give me ads no more ,, MMi ads gone too...but...this is cool but i love MMi, ads and all....will be switching back to ads now~
Last edited by z3r01; 09-18-2008 at 12:11 PM.

-
09-18-2008, 12:17 PM #18
sweet can't wait to try this out
-
09-18-2008, 12:21 PM #19
Are you talking about google ads or pop ups in safari?
___________________________________________
......epic
-
09-18-2008, 12:58 PM #20iPhone? More like MyPhone
- Join Date
- Dec 2007
- Location
- Chicago, IL
- Posts
- 259
- Thanks
- 10
- Thanked 35 Times in 16 Posts
This makes my safari slower, but most sites w/ ads are gone, EXCEPT MMi. Oh and it's a good way to get an ad-free Cycorder




LinkBack URL
About LinkBacks
Reply With Quote

