Pi-Hole: url to other url redirect with unbound

Hello forum users,

Maybe someone can help me. I want to redirect from one URL to another with Unbound. I tried the whole thing with CName. But apparently that doesn't work. What must the line in the conf look like exactly?

local-zone: "xxxxx.com" redirect
local-data: "xxxxx.com CNAME xxxxx.com."

thank you


Would you care to explain what you are trying to achieve?

There may be easier ways than adding CNAME records.


I just want to redirect INTERNAL in the network when calling a URL to another URL INTERNAL with unbound.

So you have e.g. a fancyphone.local sitting at, and now you want smartphone.local to point to fancyphone.local's IP address as well?

If it's not the redirect itself you are after, how about creating a Local DNS Record for the intended target IP address in Pi-hole instead?


Thanks for your help. I want to go to a url, for example video.com, when I unbound the url video.com. is redirected. I want a point behind the url. Since it is
is an FQN domain, I can bypass advertising.

And I wanted to do that with Unbound. But I can't get it.

(It's not necessary to quote full replies - use the Reply button for referring your answer to a previous post in its entirety.)

If that means you are trying to point video.com to something like video.com/mainPage/video-1, that would be beyond the scope of DNS.

DNS is only concerned with domain names (i.e. video.com in the example). Anything in a URL behind the domain (i.e. /mainPage or /mainPage/video-1) is completely invisible to DNS.

1 Like

The desired behavior is

video.com --> video.com. (see the dot)

In that case, I doubt that CNAME resolution would help, as the URL in the browser would remain untouched. It's only DNS resolution that will be one step longer before it returns the final IP.
You can't rewrite URLs in DNS - it's totally lacking understanding of URLs.

Dont mean to bump an old thread,
But what about something like this?

video.com --> video.net

video.com --> books.com

Just need to redirect to a root domain.
I have no idea how to go about this, and CNAME's are not working either.