Add new dns hostnames

lastlink edited this page Sep 27, 2018 · 3 revisions

Guide on adding new custom hostnames to point to wherever you'd like

Really should have been a clear guide on how to do this.

Based on:

To add a new hostname record run this command:

  • pihole -a hostrecord {Router's-WAN-IP} *e.g. pihole -a hostrecord
    • can only do this for one record
  • add additional urls vi /etc/hosts

To make sure .local machine works:

  • vi /etc/pihole/setupVars.conf

Add: server=/domain.lan/ where the end number is the ip of your router e.g.

Don't forget to restart after making any dns changes:

  • systemctl restart pihole-FTL.service
  • reboot this is a linux restart command that should not be needed


  • ping will only work if ip is a machine that accepts pings

A dns flush may be needed to check for the new ip.


  • vi shortcuts
    • type a to start typing
    • to exit type esc then :wq to write change or just :q leave without saving
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.