• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved non-existent subdomain is redirected to the default page

Merlin1220

New Pleskian
Server operating system version
Ubuntu 22.04.4 LTS
Plesk version and microupdate number
Plesk Obsidian Version 18.0.60
I have many domains hosted on my Plesk server and there is a problem with one of them. Non-existing subdomains are redirected to the default page. This only happens with this one domain, with the others you get the expected 404 error.

sub.domain.com -> redirect to the correct Website (if exists)
news.domain.com -> redirect to the service via reverse proxy (it worked)
notexist.domain.com -> redirect to the default (Plesk login) Page (not good) Subdomain does not exists!
notexist.otherdomain.com -> redirect to 404 (as expected) Subdomain does not exists!

On this subdomain (news) i changed the reverse proxy to point to a service running on http://localhost:9000, but that doesn't seem to be the problem. Even if I set the configuration to default, this problem persists, but really only for this one domain.

The Problem is only on this particular domain, no other has this issue.

Please help me, I don't know how to solve this problem.

The forwarding with the reverse proxy to this service works without any problems.

I can gladly share settings or other necessary things so that you can help me further.

best regards Andy
 
If there is no vhost created for a domain or subdomain, it is normal that it leads to the default page since there is no place to point it to, becase apache / nginx not know what to do with that domain.

To avoid this, the affected domain should have a wildcard vhost so that everything points to the same site and shows a 404.

In otherdomain.com have you a *.otherdomain.com ?
 
I think, this is not what i want. Maybe my description war not clear enough.
wkfworld.com -> the main domain (works fine)
asia.wkfworld.com -> a subdomain (also works fine)
uk.wkfworld.com -> an other subdomain (also works fine)
... and many subdomains more ...
news.wkfworld.com - > special subdomain with the nginx-reverse-proxy (works as planed)

default proxy is disabled, and i use this nginx settings instead.

location / { proxy_pass http://127.0.0.1:9000; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $server_name; }

the subdomain news.wkfworld.com is configured as normal website (/news) there is the default webroot, with the index.html which points to the default website, but with the above nginx configuration, everything should be forwarded to
if i configure a wildcard vhost for wkfworld.com, every subdomain under wkfworld.com would not working anymore ?
i need this subdomains because, the all have individual websites (wordpress)
you can try this for your self, if you go to an existing (sub)domain, like asia.wkfworld.com or news.wkfworld.com everythink works normal, but if you are try an non exinsting subdomain like testing.wkfworld.com you are forwardet to an default website, which is not normal.
i have the same behavor for all Domains, maybe there is something wrong with the hole konfiguration.
The DNS is done by my provider, there is of course a wildcard for every domain like *.wkfworld.com, the subdomains then handelt by plesk.
You can also try octogon.at there is the same, if you try zzz.octagon.at (which does not exists) you are redicrect to an default page, why is this so ?
This behavor is only with the firefox browser, if you use chrome it compains about the SSL and don't show you the default page.

i hope this clears things up, what i exactly wan't and what is not working as intended. Maybe this is normal, everthing worked so far, the only thing i am woored about is the security. non existing subdomains should not point to the default (login) page.

Regards
Andy
 
I think, this is not what i want.
I think you do :)

If a requests get made to a non existing sub domain the web server does not know how to handle the request because there's no vhost for the domain. Which is why the 'default' domain page gets shown.

if i configure a wildcard vhost for wkfworld.com, every subdomain under wkfworld.com would not working anymore ?
No, existing (sub) domain will take precedence over the wildcard.

You can also try octogon.at there is the same, if you try zzz.octagon.at (which does not exists) you are redicrect to an default page, why is this so ?
I am getting the Plesk default domain page when I am to visit the zzz sub domain.
 
Back
Top