Redirecting non existent domains that resolve to the server IP

molcomp

Member
Feb 28, 2013
16
0
51
cPanel Access Level
Root Administrator
Hello

I have looked over the forum and there is some disussion on the subject but there is not a trully answer. I appreciate if anyone can tell me how can I redirect the requests for domains that do not exist in cpanel and in dns but they are registered at the registrar with my dns records. Basically the domains resolve to my dns and cpanel server but they have been deleted due to non payment. Now I would like to show custom page for all those non existent domain requests.

Alex
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

To confirm, have the domain names been deleted at the domain registrar? If so, there is no way to control the page displayed when browsing to them because it's likely the domain registrar has disabled DNS functionality.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
You mentioned a deletion due to non-payment. Could you elaborate on what has been deleted?

Thank you.
 

molcomp

Member
Feb 28, 2013
16
0
51
cPanel Access Level
Root Administrator
Hello

Sorry for the confusion. The account was deleted in cpanel and also the domain was deleted from the dns servers. But the domain registrar information still point to our dns servers as host.

Alex




You mentioned a deletion due to non-payment. Could you elaborate on what has been deleted?

Thank you.
 

PenguinInternet

Well-Known Member
PartnerNOC
Jun 20, 2007
196
27
78
Cardiff, UK
cPanel Access Level
DataCenter Provider
Twitter
I think you mean that you wish to show a holding page for example for any active domain that is using your nameservers, regardless of whether it has an active hosting account or DNS zone in place. if this is the case, you need to set up a wildcard DNS entry for this so that the domain is able to resolve accordingly.
 

quietFinn

Well-Known Member
Feb 4, 2006
2,041
551
493
Finland
cPanel Access Level
Root Administrator
Hello

Sorry for the confusion. The account was deleted in cpanel and also the domain was deleted from the dns servers. But the domain registrar information still point to our dns servers as host.
There is still some confusion:
If the domain is deleted from your dns servers, and the registrar points the domain to your name servers, then the domain can not resolve to your server's IP, can it?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Sorry for the confusion. The account was deleted in cpanel and also the domain was deleted from the dns servers. But the domain registrar information still point to our dns servers as host.
You must have the DNS Zone hosted on the server the name servers point the domain name to. Also, if there is no cPanel account, there is no way to serve content from the cPanel server. You will have to see if your domain registrar allows you to configure a web page and use their name servers.

Thank you.
 

molcomp

Member
Feb 28, 2013
16
0
51
cPanel Access Level
Root Administrator
Thank you everyone for the help.

***The wildcard sollution I am not sure how that will work. There are over 1500 domains at the registrar pointing to our servers. I want to display a page for those 1500 domains that the domains have been suspended due to non payment or some other reason.



If the domain is deleted from your dns servers, and the registrar points the domain to your name servers, then the domain can not resolve to your server's IP, can it?
***Yes that is correct id does not point to the servers IP but as I mentioned above the dns servers are hit with requests for over 1500 domains that are set at the registrar with our dns servers. I want to display some page for them saying something in order for the domain owners to either pay or change the dns settings at the registrar.

You must have the DNS Zone hosted on the server the name servers point the domain name to. Also, if there is no cPanel account, there is no way to serve content from the cPanel server. You will have to see if your domain registrar allows you to configure a web page and use their name servers.
*** the registrar does not allow web page display. Also if we setup a dns zone on the server and if we setup a cpanel account that will mean we will have to keep checking the registrar info to find out if the domain still points to our server. If it doesnt then we will delete it, but that is a difficult thing to keep up for 1500 domains or so.

Hope its explained better this time.

Alex
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Have you considered creating a custom suspended account page? You can do this via:

"WHM Home » Account Functions » Web Template Editor"

This way, any domain names that resolve to your server will display the custom page of your preference instead of the default suspended page when an account is suspended.

Thank you.
 

PenguinInternet

Well-Known Member
PartnerNOC
Jun 20, 2007
196
27
78
Cardiff, UK
cPanel Access Level
DataCenter Provider
Twitter
There is still some confusion:
If the domain is deleted from your dns servers, and the registrar points the domain to your name servers, then the domain can not resolve to your server's IP, can it?
Yes it can, with a wildcard zone. That will provide a DNS entry for any domain using that nameserver that doesn't explicitly have it's own zone defined. Have a Google for "bind wildcard zone" and you'll find plenty of articles discussing this for just this required implementation. It's just a single config item - you don't add zones in for every domain that you wish to be handled by this.
 

molcomp

Member
Feb 28, 2013
16
0
51
cPanel Access Level
Root Administrator
Thank you both for the help. What cPanelMichae indicated with web template editor was what I wanted but I cannot do it that way. The reason is because I have one web server with cpanel and two servers with dns only cpanel and all three are in dns cluster. The older domains that I want to redirect to some page have in the registrar only 2 of the servers they do not have the cpanel web/dns server in their records, thus I cannot use the web template editor option in cpanel web server. Realizing that I tried setting the bind wilcard zone option, but I cant make it work. I am working on the issue but I appreciate if you can point me what is wrong in my config. The config is:
zone "." {
type master;
file "/var/named/db.blackhole";
};


content of file "/var/named/db.blackhole";

. 10800 IN SOA dns. root.dns. (
4 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL

IN NS dns
*. IN A 176.9.117.123


Thank you
Alex