How a subdomain can be available with www prefix?

Created:

2017-06-05 05:17:31 UTC

Modified:

2017-06-20 20:14:23 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How a subdomain can be available with www prefix?

Applicable to:

  • Plesk 10.x for Linux
  • Plesk 9.x for Linux/Unix
  • Plesk 8.x for Linux/Unix
  • Plesk 7.5.x Reloaded

Resolution

To create www prefix for subdomains you need to take the following steps:

1) Create the vhost.conf file in the /var/www/vhosts/<domain_name>/subdomains/<subdomain_name>/conf directory with the following content:

ServerAlias www.SUBDOMAIN.DOMAIN.com

(change the SUBDOMAIN and DOMAIN names with required ones)

2) Add an appropriate A record to the DNS zone of the domain via Parallels Panel , Domains , <domain_name> , DNS settings

(specify this domain's names instead of SUBDOMAIN / DOMAIN names and its IP address instead of 192.168.1.1):

#www.SUBDOMAIN.DOMAIN.com. A 192.168.1.1


3) Reconfigure website for applying changes:

For Parallels Plesk Panel prior 10.x:
# $PRODUCT_ROOT_D /admin/sbin/websrvmng -v -a

For Parallels Plesk Panel 10.x:
# $PRODUCT_ROOT_D /admin/sbin/httpdmng --reconfigure-all

Have more questions? Submit a request
Please sign in to leave a comment.