A Pi-Hole server is an open source project that is created to block ad domains by DNS. If a domain has been queried, a small transparent graphic will be shown instead of the advertisement. You can check this project out on Github click here.
This guide will show you how to make a Pi-Hole server on a Ubuntu Server.
Login into the console screen.
sudo apt-get update
sudo apt-get install apache2
sudo apt-get install php libapache2-mod-php
curl -L install.pi-hole.net | bash
Login: http://pi-hole server/admin
That’s it! Now you will have to configure your DHCP clients to use the Pi-Hole DNS server.