How to force DNS server to give the html page?

Actually the question may seem strange and come across thoughts, but do not think anything bad!

In General. There are DNS hosting under their own control, I want to make it so that when you query for a domain, located at the bottom hosting, if the client has not renewed the service, or domain is not renewed, was given an error page.

For example, the client mydomain.ru. The client is not paid service. You need to give the page mind mydomain.ru/error.html the text for access to the service suspended and bla-bla-bla...

How is it possible to implement? The DNS server BIND
July 9th 19 at 10:28
1 answer
July 9th 19 at 10:30
Solution
Send to your private IP, not client IP. Which sits on nginx. Which all the queries and answers as you need.

All you need to do in a bind - as it to adjust on the fly zone on the basis of data from the billing system.
Well, if we imagine that the query and domains a lot? And how to do it? Using CNAME? Expected realization of similar problems at the Internet service providers. For example it comes to the end of the billing cycle, the user when requesting any website spits the window that it was time to pay, it's the same series I guess. And suppose that, for example, multiple domains, mydomain.ru my1domain.ru my2domain.ru etc. - kristoffer.T commented on July 9th 19 at 10:33
: what's the problem with nginx? he handles all domains. no need to configure it for specific domain. - Weston98 commented on July 9th 19 at 10:36
Ahhh... Here it is Cho... Ie in a zone named for example, to specify mydomain.ru the address of the web server and the web server dynamically create the config c with the domain mydomain.ru and give their page with the error? Am I correct? - kristoffer.T commented on July 9th 19 at 10:39
: on the web server to create for a specific domain does not need anything. the domain name just take out the variable (nginx has internal variables). I suspect that this can be done even on a bare nginx without any PHP, etc.
https://debian.pro/738 - Weston98 commented on July 9th 19 at 10:42

Find more questions by tags Domain name system