How ironic, I just finished setting this up for a client.
Since you are on shared hosting, you will need assistance from your provider.
Two things need to be accomplished
1. The httpd.conf file, looks something like this
Code:
<VirtualHost 123.45.678.9>
ServerAlias domain.com
ServerAdmin webmaster@domain.com
DocumentRoot /home/domain/public_html
BytesLog domlogs/domain.com-bytes_log
ServerName www.domain.com
</VirtualHost>
It needs to be changed to this
(addition highlighted in blue)
Code:
<VirtualHost 123.45.678.9>
ServerAlias domain.com .*domain.com
ServerAdmin webmaster@domain.com
DocumentRoot /home/domain/public_html
BytesLog domlogs/domain.com-bytes_log
ServerName www.domain.com
</VirtualHost>
2. Dns Entry
In the dns area of the server a new entry need to be added.
Code:
*.domain.com. 14400 A 123.45.678.9