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 126.96.36.199
Remember to replace 188.8.131.52 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 184.108.40.206> ServerAlias www.domain.com ServerAdmin email@example.com 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.