Wildcard subdomains are used to redirect visitors to the “main” website even if they are trying to access a different subdomain. This is also useful if visitors mistype the www portion (e.g., ww.yourdomain.com).
Another situation in which wildcard subdomains are especially required is when using WordPress Network (formerly known as WordPress Multisite or WPMU) and wish for user’s blogs to look like user.yourdomain.com.
It is possible to enable wildcard subdomains on your Jolt-hosted website in three different ways:
1. Navigate to cPanel > Subdomains and create a subdomain *.yourdomain.com. This is the simplest way.
2. Another way is to use WHM if you have access to it. Go to ‘Edit DNS Zone’ then select the domain you would like to enable wildcard submissions from the list. Under ‘Add New Entries Below this Line’ fill in the fields so that they look like this:
* 14400 IN A 184.108.40.206
Remember to replace 220.127.116.11 with your actual server IP.
3. The third way you can enable wildcard submissions is to edit httpd.conf (Apache configuration file) directly. Keep in mind that in order to do this, you will need SSH root access.
Log in as root and access the httpd.conf file, usually located in /etc/httpd/conf. However, the path may be different depending on your Linux distro.
Locate the VirtualHost entry for the domain name you wish to enable wildcard subdomains. This is how it will look like:
<VirtualHost 18.104.22.168> ServerAlias www.domain.com ServerAdmin firstname.lastname@example.org DocumentRoot /home/domain/public_html/ ServerName domain.com User domain Group domain BytesLog /usr/local/apache/domlogs/domain.com-bytes_log CustomLog /usr/local/apache/domlogs/domain.com combined ScriptAlias /cgi-bin/ /home/domain/public_html/cgi-bin/ </VirtualHost>
When you’re finished, restart Apache. Wildcard subdomains should work for yourdomain.com straightaway.