LinuxPlesk

How to create wildcard subdomains in Plesk

plesk logoMany times you may want to have domain.com as well as *.domain.com point to the same site in Plesk control panel. This can possible in Plesk by making some small changes in the Apache configuration file.

Let us start with the same guys 🙂

1) 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.

 

2) Edit the Apache configuration file /var/www/vhosts/domain.com/conf/vhost.conf or /home/httpd/vhosts/domain.com/conf/vhost.conf file and insert below information

ServerAlias *.domain.com

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

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

3) Reload the Apache configuration file

# /etc/init.d/httpd reload

 If any feedback, queries are always welcome!

Abhijit Sandhan

Loves Open Source, Blogging, Traveling, Hiking and sharing Knowledge!

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button