Setup OpenWrt as a DNS server to redirect a domain

Hi all,

I usually find answers by reading existing posts. This time its quite urgent so please anyone help. thank you. (I have done an hour reading already)

I have registered a domain A.COM and wish to redirect all visits to B.COM before I have time to create a site for it.

the domain provider charge USD98/year for providing the redirect service :anguished:

I understand my openwrt 19.07 is running dnsmasq DNS server. Can I use it for redirecting the domain? and how please. thank you.

If it works, I suppose to put my router's address on the name server list of the a.com domain provider?

1 Like

Hi,
I have the exact same question.
I am thinking that it should be possible to add an entry to dnsmasq that redirects a public domain example.com to another public domain redirected_example.com

Can someone help?

Thanks

check out param addn-hosts for dnsmasq, it will redirect to IP, not sure if it is capable to redirect to another DNS.

2 Likes

What you need is a CNAME record:

1 Like

CNAME requires a working A/AAAA, so it is simpler to just rebind the domain if you don't have those:
https://openwrt.org/docs/guide-user/base-system/dhcp_configuration#hostnames

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.