Hacker News new | ask | show | jobs
by shasts 1223 days ago
If I choose their DNS, the website shows a text at the bottom that says "You are using dns0.eu"

How does the website know I'm using their DNS? I couldn't find anything in the HTTP header that would help them with this.

https://imgur.com/fMZwxYz

3 comments

JS does a GET request every 2 seconds or so to some random subdomain (probably to avoid caching): https://i.vgy.me/qCTabA.png

The JSON response contains 'status: "unconfigured"' when you're not using their resolver and 'status: "ok"' when you are: https://i.vgy.me/iVgIe1.png

That green bar just appears after a "ok" response (no page reload needed).

Here's an open source nameserver that helps ID DNS resolver in use: https://github.com/redirect2me/which-dns
stupid q here but what font is your terminal using from your screenshot pic
They could be giving out different IP (or CNAME) for people using their DNS. Then the site is just slightly different depending on how it is accessed. or i suppose they could be looking at logs of the ips using their dns and checking all visitors to the website, but that would be wild.

ooh they could also have a host that is only resolvable from those servers, and have the front end dynamically load that message from that host. and if it fails it does not show anything.

I guess they redirect you to a different IP than they publish in the public DNS?