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

Love to Automate, Blog, Travel, Hike & spread Knowledge!

Related Articles

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button