# Cat-DNS: a DNS server that resolves everything to cats

DevFeed: [Cat-DNS: a DNS server that resolves everything to cats](<https://devfeed.tech/articles/cat-dns-a-dns-server-that-resolves-everything-to-cats-35520.md>)

Original publisher: [Read original article](<https://meowni.ca/posts/go-cat-dns-go/>)

Author: Monica Dinculescu

Published: 2014-02-18T00:00:00Z

Content type: tutorial

Language: en

Sources: [Monica Dinculescu](<https://devfeed.tech/sources/monica-dinculescu.md>)

Topics: [HTTP](<https://devfeed.tech/topics/http.md>), [servers](<https://devfeed.tech/topics/servers.md>), [Internet](<https://devfeed.tech/topics/internet.md>), [Code](<https://devfeed.tech/topics/code.md>), [web applications](<https://devfeed.tech/topics/web-applications.md>)

Tags: [client](<https://devfeed.tech/tags/client.md>), [dns](<https://devfeed.tech/tags/dns.md>), [http](<https://devfeed.tech/tags/http.md>), [http-server](<https://devfeed.tech/tags/http-server.md>), [localhost](<https://devfeed.tech/tags/localhost.md>), [server](<https://devfeed.tech/tags/server.md>), [udp](<https://devfeed.tech/tags/udp.md>), [website](<https://devfeed.tech/tags/website.md>)

## AI overview

A playful tutorial for running Cat-DNS, a Node-based DNS server that resolves hostnames to a fixed cat-hosting IP address. It explains running the server on UDP port 53, configuring localhost as the DNS server, and switching the configuration back when finished.

## Source excerpt

The internet needs more cats. DNS servers are the authority on all things internet. Therefore, the best DNS server is the one that resolves everything to cats. Guess what kind of DNS server this is (Hint: it's the cat kind). Making it go First, get the code, and the npm packages you need (the instructions are with the code). To run, start the server as a privileged process. This is because to be a DNS server, you need to be a UDP server on port 53. This is a small numbered port, which means it needs superpowers. This is how your run it: sudo node cat-dns.js You also need to somehow set your DNS server to be localhost. On a Mac, I do this by creating a new (wi-fi) interface (called Cats), in my Network preferences, and setting its DNS server to 127.0.0.1. You could do this on your normal interface, but this makes switching back and forth easier. Warnings While you're playing with this, pretty much nothing on your computer that requires the internet works. Except for your browser. And then that's mostly cats. So being able to deactivate this easily is kind of key (I know. You might think "Why would I ever want to deactivate cats?", but trust me on this one). I also recommend killing all the things that need to call the mothership (google hangouts, twitter feeds, dropbox, iMessage), because they will not like your sassy cat answers, and will slow everything down. You are ready Go in your browser to www.google.com and wait a bit. You should see a cat. Go to a different website. Another cat. Congratulations. Your internet is now all cats. Wait, what? Do not panic. While I recommend you don't look at the source because it's gross, if you do look at the source, you'll notice all it does is resolve any hostname to 54.197.244.191, which is a magical place on the internet that has cats. My friend @eigma made it, and is hosting it, so please try not to kill all the cat bandwith at once. You could also resolve everything to localhost, and serve your own for now cats on an http