In some situations, you may want to have domain.com as well as *.domain.com point to the same site in Plesk. Plesk will automatically set up hosting for domain.com and www.domain.com within the Apache configuration, but you can direct all subdomains for a particular domain to a certain virtual host fairly easily.

DNS
Add a CNAME or A record for *.domain.com which points to domain.com (for a CNAME), or the domain’s IP (for an A record.

Apache Configuration
Edit the /var/www/vhosts/domain.com/conf/vhost.conf or /home/httpd/vhosts/domain.com/conf/vhost.conf file and enter this information:

ServerAlias *.domain.com

If the vhost.conf didn’t exist before, you will need to run:

# /usr/local/psa/admin/bin/websrvmng -av

Whether the vhost.conf was new or not, you will need to reload the Apache configuration:

# /etc/init.d/httpd reload

Credit for this fix goes to SWSoft’s KB #955


2 Comments on “Using wildcard subdomains in Plesk”

You can track this conversation through its atom feed.

  1. links for 2008-11-11 » Go Web Young Man says:

    [...] Using wildcard subdomains in Plesk | Racker Hacker How to setup wildcard subdomains in Plesk. (tags: server plesk domains) SHARETHIS.addEntry({ title: “links for 2008-11-11″, url: “http://michaelwender.com/2008/11/11/links-for-2008-11-11/” }); This entry was written by Michael Wender, posted on November 11, 2008 at 2:00 pm, filed under Links. Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL. « Farewell Transmission from the Phoenix Mars Lander [...]

  2. December 3rd: at randomtangents.com says:

    [...] Shared Using wildcard subdomains in Plesk | Racker Hacker. [...]

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">