1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

wildcard virtual subdomain and...

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by saatchi, Apr 23, 2011.

  1. saatchi

    saatchi Basic Pleskian

    Dec 17, 2005
    Likes Received:

    I search my problem and I couldn't find & solve it. I think that it's a public problem for who wants to make virtual sub-domains.

    I want to redirect my non-exist subdomains to my main site with its parameters like this :

    nonexist.mydomain.com -> mydomain.com/?name=nonexist

    To make virtual subdomain,
    1- I added an A record: * A my-ip-address
    2- After that, I added "ServerAlias *.mydomain.com" into conf/vhost.conf

    After this, my non-exist subdomains are working but they will open Apache's default page. How can I set that I want to open my main site.
  2. clinton4

    clinton4 Regular Pleskian

    Oct 23, 2008
    Likes Received:
    I would also like to know this. Could the Parallels team answer this?
  3. elR

    elR Guest

  4. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    Jul 5, 2007
    Likes Received:
    Seattle Area
    You can do this for all domains, or just one domain like this

    That will redirect all sub domains to your main domain, then on your main domain you can safely say since the host is a sub domain and your on the main domains page, the sub domain doesnt exist, so then use an .htaccess to mod_rewrite the url
  5. christianc1

    christianc1 New Pleskian

    Aug 22, 2011
    Likes Received:
    Hello Everyone,

    I´m trying to setup a virtual subdomains to the users in my website. Like user john signs up and is given a subdomain to access his account, john.website.com, which when rendered in the browser will automatically bring up http://website.com/shop/john.html username=john or similar

    Is there Anyone can help me with it?
  6. volgot

    volgot Guest

    Very uncomfortable

    The problem with Plesk & virtual hosts is even worse.

    Instead of having to write ServerAlias *.domain.tld Plesk writes in every generated **httpd.include:
    Еven for subdomains it writes:
    By the way, Parallels personally don't use www.forum.parallels.com
    Do you know anyone who uses? O_O

    1. What this "www" is using for? And especially for subdomains?
    2. Is not easier to use ServerAlias *.domain.tld onse? No one need neither "www" nor "ipv4" in this way.
    3. Which address redirects non-exist subdomains if several Webspaces uses one shared IP? To another Webspace!

    Namely, I have several Webspaces in Plesk, some with shared IP, with several different domains & subdomains on each, so if on a Webspace #2 let us say subdomain blabla.apple.com don't exists then Apache redirects visitors to the domain let us say www.[B][I]microsoft.com[/I][/B] on Webspace #1 - not just because they shares one ip but because Plesk loves aliases www.domain.tld only.

    I was forced to add ServerAlias *.domain.tld manually in every **httpd.include generated by Plesk and remove useless www.sub.domain.tld && www.domain.tld. After all redirects works ok, but I think Plesk can overwrite my files with their "www" again at any time (I hope without "http://", you never know..) so I think this must be corrected by developers as soon as possible.

    Btw, why not to add in Plesk DNS template a record with *.domain.tld by default?
    Last edited by a moderator: Jan 25, 2012