DNS default resolution for broken URL's

Simon Waters Simon at wretched.demon.co.uk
Mon Sep 2 17:16:00 UTC 2002


Fred Swork wrote:
> 
> Hi,
> 
> The following may be off the wall, however, I will ask it anyway.
> 
> Is it possible to configure BIND so as to resolve a hostname to a default IP
> address, in the event that the hostname does not exist or the resolution
> fails for any particular reason e.g. All broken URL's always resolve to an
> address w.x.y.z. I am trying to investigate implementing a default search
> page for URL's that don't exists.
> 
> If so how ?

I'm not inspired as to a general method without hacking the
code.

If you control the "search path" on the client (or on an HTTP
proxy server used by the client perhaps<hint hint> depending if
it tries the search path?!) you can add something like.

/etc/resolv.conf
search example.com invalid

And zone invalid could have a wildcard "* IN A 127.0.0.2".

Problem is if you do it at the DNS server level you'll catch all
the other broken traffic as well, and you probably don't want
that! I'd be looking at my proxy servers features and my browser
(many browsers, lynx especially, already go a little mad when
they encounter a broken URL, and try lots of variations usually
to no effect).


More information about the bind-users mailing list