How can I configure DNS to redirect url.local to internal IP address

Background information

I am configuring some services to run on my internal network. The documentation tells me I need to configure my router to forward the my-service.local url to the internal IP address of the service.

As Pi Hole is managing my DNS I think I need to do the forwarding on the Pi-Hole.

Question

Can anyone tell me how to forward my-service.local url to the internal IP address inside of Pi-Hole.

Thanks for your help with this :slight_smile:

This is normally done in the /etc/hosts file on the Pi-Hole platform.

Edit this file (sudo nano /etc/hosts), leave the existing line entries intact, and add a new line for each domain you want to map. Format of each line is IP, followed by at least one space, then client name with no spaces.

An example new line might be:
192.168.0.103 laptop

Save and exit.

Thanks for the reply @jfb

I have included an image of the changes I have made.

Please can you confirm if what I have done is correct.

new-url

I have the same question. I want to type in my browser something like "pihole" and have it take me over to 192.168.0.9.

I did edit my /etc/hosts file. That does work locally on the Pi to resolve the IP address. However, it is not sending it to other clients when they ask for the same name to be resolved.

Suggestions?

Thanks,
-Eric

Adding the dots! That worked!

Thanks for the quick & simple answer!
-Eric

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.