• 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.
  • 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.

Subdomains - redirect to www.domain.com when inexistent or else go to real folder

R

RicardoF

Guest
Dear sirs

Let me cut to the chase so I won't waste your time. I need to have a domain that accepts all subdomains associated with. For example, having the main domain "www.domain.com", I want/need that all xxxx.domain.com like redirect to www.domain.com. Therefor, all xxx.domain.com will read the index.html (for instance) on the www.domain.com.

The main issue, besides this, is to have "real" subdomains like realsubdomain.domain.com. When this subdomains are real, they should read from their own files (inside the subdomains folder), when not they should read from the www.domain.com (main site).

Could you give me an hint how to do this? I have found this tutorial but it regards other version, different from the one I have "http://kb.odin.com/en/2823" - I have Linux, version 9.5

Thank you very much for your concern and help

Ricardo
 
Mentioned KB article is for other Parallels product but not for Plesk.
But why you can't use domain aliases for your purpose?
 
IgorG,

thank you for your fast answer and support.

Indeed the mentioned kb article is for another product other than plesk, I just wrote it here to best show what I would like to acomplish.

Regarding the use of domain aliases, I don't think that will fit on this particular situation since my goal is to create subdomains for a main base domain that don't really exist.

For example, how does twitter acomplish this? They have millions on xxxx.twitter.com that I am sure they didn't create any alias nor subdomain manually.

Besides that, if a subdomain trully exists (test.domain.com) then it's folder should be read. Otherwise, any xxxx.domain.com should read from the www.domain.com folder.

What do you think?

Ricardo
 
Hello once more

Tried something similar but all subdomains were grabbed by the wildcard, even the ones that existed were behaving like they didn't.

From what I read, I really think this will pull the trigger! Let me give it a go and then I will report to you how it went.

Thanks a million for your help and patiente.

Ricardo
 
Ok, it's something similar that I need.

The main issue is using the kb you provided, I will have all non existent subdomains getting grabbed by the zzwikdcard subdomain but in fact I would need this behaviour on the main domain, the www.domain.com.

After that, according to the subdomain inserted by the user, the site would output the data of that subdomain.

What I think I could do with the kb you provided is having the site in the zzwildcard subdomain. This way all subdomains, if non existent, would hit the sitr files.
 
Back
Top