• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question Default Domain when using * wildcard A record

mike_rb

New Pleskian
We have several websites in development on our Plesk server. I have a wild card domain set up that points to the IP of that server with a * A record. When we start developing websites we will do something like devsite.ourdomain.com. When that site gets published that development URL is no longer valid, however, any subdomain that is not active in Plesk will always redirect to one website that is in production. How do I stop this behavior? I would rather any development URL that is not active in Plesk be shown a 404 page. Thank you!
 
hello @mike_rb

When a client requests a certain domain, Apache parses the requested domain name. Then Apache searches for the virtual host with the requested domain on the IP address specified in the request. If the host exists, Apache sends the requested files from this host to the client.

If the requested virtual host is not found, Plesk uses the following entities to resolve the request:
  1. Default domain. This can be created for a specific IP address. If a request to this IP address contains the name of a non-existent domain, Plesk redirects this request to the default domain.
  2. Default virtual host. This accepts all requests to server IP addresses that could not be directed to any default domain.

please see advanced administration guide.

so, in shot words: no, it is not possible to make Plesk return 404 in case domain does not exist in Plesk but resolve to it's IP.
but you can assign default domain with some neutral index.html, which will describes that there's no such requested domain.
 
Back
Top