Post Reply 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wildcard Sub Domains
16-03-2011, 01:17 PM
Post: #1
Wildcard Sub Domains
How to enable wildcard subdomains?

Wildcard subdomains are useful when you wish to redirect all visitors to your main website regardless of what subdomain they access your website through.

This is also useful when someone mistypes www for example and writes

In other words, with wildcard subdomains it won't matter whether someone accesses your site through or

Here are three ways to enable wildcard subdomains for your website:

1) The easiest way to enable wildcard subdomains is to create a subdomain * EEZEE customers can do this from their cPanel > Subdomains.

You should make sure that the subdomain's Document Root is public_html.

2) If you are using cPanel and you have access to WHM, you can log in to WHM and go to Edit DNS Zone. Select the domain you wish to modify from the list of available websites.

Under Add New Entries Below this Line you should fill in the fields so that they look like:

* 14400 IN A

where is the IP of the account

3) Another way to enable wildcard subdomains is to directly edit the httpd.conf file. (For this you will need root access to the server hosting the account.)

Log in as root and open the httpd.conf file (usually this file is located in /etc/httpd/conf) with a text editor such as vim or nano. Then find the VirtualHost entry for the website. It should look like:

DocumentRoot /home/yourdoma/public_html/joe
User yourdoma
Group yourdoma
BytesLog /usr/local/apache/domlogs/
CustomLog /usr/local/apache/domlogs/ combined
ScriptAlias /cgi-bin/ /home/yourdoma/public_html/joe/cgi-bin/

The only modification you need to make is change:



ServerAlias *

EEZEE Web Solutions Tech Team
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 

Forum Jump:

User(s) browsing this thread: 1 Guest(s)