Using wildcard subdomains in Plesk

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

DNS Configuration:

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

vi /var/named/run-root/var/

Add the following line,

*              IN CNAME


*              IN A  Record IP of the domain)

Restart the DNS service
/etc/init.d/named restart

Apache Configuration:
Edit the /var/www/vhosts/ or create the vhost.conf if doesn’t exist and add the following line,

ServerAlias *

then Run,

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

Add the following line in /var/www/vhosts/ file,(With in 80,443 VirtualHost entries)

Include /var/www/vhosts/

Then restart the apache,

/etc/init.d/httpd restart