I keep saying what you can do: You can serve an error or a redirect.
If cPanel does what you want, you need to show me what it is cPanel is doing, because it cannot be doing what you’re saying it’s doing, as I understand the word “block” to mean.
I keep saying what you can do: You can serve an error or a redirect.
If cPanel does what you want, you need to show me what it is cPanel is doing, because it cannot be doing what you’re saying it’s doing, as I understand the word “block” to mean.
A domain is not accessing your server. That doesn’t even make sense.
@Joe
My apologies for misinterpretations.
I intended to say that I want to stop a domain from sending requests to my server. Is there any possibility by showing them a forbidden page or something else?
You can show anything you want.
You can make your default domain serve an error page. So, create a domain that is just for this purpose in Virtualmin, and put an error page in /home/domainname/public_html/index.html
and make that domain the default domain. Then, any time a request comes in for a hostname that is not one of your configured domains, it will be served the error page you configured.
There are many ways to do this, but that’s probably the simplest.
As I said above, if cPanel does what you want, you need to explain what it is they’re actually doing. Because what you say they’re doing, cannot be what they’re doing, so I can’t tell you how to do it, because I don’t know what it is.
Domains don’t access servers. Domains are names.
Thanks for the clarification.
Moreover, I have one more query:
I own the domain *.com and have pointed its nameservers to my server. However, it shows the error “DNS_PROBE_FINISHED_NXDOMAIN” because I haven’t added it anywhere on my server.
On the other hand, the domain duumo.com displays my hostname page, even though it has the same scenario as *.com. Why does this happen?
that error is dns related by the below, not a response from server.
Apache serves the best match based on the host header, the destination IP and destination port. If there isn’t a match, it serves the default page. This is HTTP protocol stuff you should get a little familiar with. It happens because that’s what’s supposed to happen. A web server is supposed to respond to web requests, modern HTTP allows the web server to choose to serve different content based on the name in the host header. If nothing matches the combination of host, IP, and port from the request, Apache can be configured to do a variety of things. “blocking” is not one of those things, though, because it doesn’t even know there isn’t a match until it has accepted the request.
If you have DNS questions, please open a new topic. FAQ - Virtualmin Community
Thanks everyone @Joe @stefan1959 @ID10T @jimr1
Thanks for the screenshot of Firewall!
This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.