What

nip.io is a free service that provides (sub-)domains for any IP:

$ dig foo.1.2.3.4.nip.io

; <<>> DiG 9.16.6 <<>> foo.1.2.3.4.nip.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9431
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;foo.1.2.3.4.nip.io.		IN	A

;; ANSWER SECTION:
foo.1.2.3.4.nip.io.	432000	IN	A	1.2.3.4

;; Query time: 40 msec
;; SERVER: 192.168.178.1#53(192.168.178.1)
;; WHEN: Mi Okt 14 14:30:22 CEST 2020
;; MSG SIZE  rcvd: 63

$ dig foo.bar.1.2.3.4.nip.io

; <<>> DiG 9.16.6 <<>> foo.bar.1.2.3.4.nip.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21194
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;foo.bar.1.2.3.4.nip.io.		IN	A

;; ANSWER SECTION:
foo.bar.1.2.3.4.nip.io.	432000	IN	A	1.2.3.4

;; Query time: 40 msec
;; SERVER: 192.168.178.1#53(192.168.178.1)
;; WHEN: Mi Okt 14 14:30:30 CEST 2020
;; MSG SIZE  rcvd: 67

$ dig bar.1-2-3-4.nip.io

; <<>> DiG 9.16.6 <<>> bar.1-2-3-4.nip.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60965
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;bar.1-2-3-4.nip.io.		IN	A

;; ANSWER SECTION:
bar.1-2-3-4.nip.io.	432000	IN	A	1.2.3.4

;; Query time: 43 msec
;; SERVER: 192.168.178.1#53(192.168.178.1)
;; WHEN: Mi Okt 14 14:30:48 CEST 2020
;; MSG SIZE  rcvd: 63

Why

This is quite useful when either testing host based routing or for multiple services on the same machine and port in the local network. For example, you can serve octoprint under octoprint.192.168.0.10.nip.io and the webcam feed under cam.192.168.0.10.nip.io.