-5

So I would like to block a specific website on OS X and iOS devices and display a message in its place something like:

How can I do this so that the block works across all web browsers?

  • 1
    This isn't really something you can do "on a mac", or even "on a PC" for that matter... not without third party software. You'll need to research parental control software that can be installed, or other types of control software, that would give you both blocking as well as custom messages. You can easily edit the hosts file on a Mac to block a website... but there won't be any custom message in its place. It will just be blocked. – Charlie74 Dec 14 '15 at 21:50
  • 1
    Found a way to do this now, using Open DNS, probably the easiest method that also works on iOS – Lukas_T Dec 15 '15 at 13:30
3

For OSX devices only: Use the hosts file (/etc/hosts) to redirect those hostnames to a local webserver.

Configure your local webserver to only serve up that message. Info here: http://osxdaily.com/2012/09/02/start-apache-web-server-mac-os-x/

For all hosts on a network:

Use an internal DNS server setup to be authorative for your domains and point them to a internal webserver showing your message.

You'll need your DHCP server to distribute your internal DNS server IP so it's used on all your client machines.

  • How do you edit /etc/hosts on iOS (the original post specifically asks about iOS)? – blm Dec 15 '15 at 18:59
0

This is a great task for a DNS provider that can apply rules or custom white / black list for clients.

I’d start with one like OpenDNS which has been around for several years with free personal tiers and you can test this first without spending money.

Once you get a feeling if DNS works for your needs, you can then decide to pay someone to set it up and run your DNS or spend your time setting up your own DNS server so you can craft the rules you want using open source tools and hardware you own or rent.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .