Techcuriosity
Resources
Linux
• About Linux
• Linux Vs Windows
• Linux File Permissions
• Linux Directory Structure
• Linux Basic Commands
• Linux Commands Glossary
• Linux Server Admin Commands
• Advanced Permissions in Linux
 
• Exim Commands
• MySQL Commands
• FTP Commands
• Shell Scripting Tutorials
 
Web Hosting
• About Web Hosting
• Windows Web Hosting
• Linux Web Hosting
• Ruby on Rails Hosting
• Web Host - Features
• DNS propagation Delay
• Wildcard DNS
• Addon, Parked & Sub Domain
• Top Web Hosts
 
Template Editing
• About Templates
• HTML Templates
• Photoshop Template
• Word Template
• CSS Template
• Oscommerce Template
 
Bioinformatics
• Introduction
• Sequence Analysis
• Bioinformatics Tools
• Bioinformatics Databases
• Bioinformatics Software
 
Free Perl Scripts for Bioinformatics
• Scripts Library
• Dna2protein.pl
• Dnafrequency.pl
• Dna2rna.pl
• Rna2dna.pl
• Count-aminoacids.pl
• Motifs.pl
• Reverse-complement.pl
• Mutation.pl
 
Curiosity Topics
• Online Data Security
• VDS Technology
• How Website Works?
• About Hacking
 
 
Home   |   About us   |   Services   |   Forum   |   Articles   |   Tutorials   |   Contact us
 


Gateway to End all your Curiosities in Information Technology and Bio-Informatics!!.. FREE turorials for Linux, Web designing, Web template Editing, Operating systems, New technology, Bioinformatics, Bioinformatics perl scripts, Clinical research and much more curious topics you need to know.  
Your IP address is: 38.103.63.59


Find more Info related to your curiosities @ our FORUM

Wildcard DNS / sub domains - Wildcard Hosting

Consider your hosting company allows you to use only 3 sub domains.
But as your website grows, you might need more number of sub domains. What you will do?
Or
Consider you want to set up https for all your sub domains.
For each sub domain you will have to buy an SSL certificates. This is costly. In such cases, you can use wildcard subdomains.


Create a wildcard sub domain. Buy 1 SSL certificate and use it for all your sub domains. It is also refer this as Wildcard hosting.

** Note **:
As a regular user, you will not be able to accomplish this task.
Contact your website hosting company for support.

The following steps are involved in Wildcard Hosting:

1. Adding the DNS entries.
2. Setting up the Apache entries.
3. Redirecting sub domain to the correct folder.

 

Wildcard DNS / sub domains and its implementation

hosting

Adding the DNS entries

If you have privilege to edit the DNS zone, you will have to add the following entries.
Example:
*.domain-name.com. IN A 121.0.0.1

Once the DNS propagation gets completed. You can try digging any sub domains.
Example:
test.domain-name.com
abc.domain-name.com
123.domain-name.com

All the above sub domain will point to the server.

Setting up the Apache entries

Now all the sub domains are pointing to the server. But there is no virtual
host entry for it. So you will get the Apache page.
You just need to edit the virtual host entries for that particular domain. Add a ServerAlias " *.domain-name.com ".

Example:
<VirtualHost IP:443>
ServerName domain-name.com
ServerAlias *.domain-name.com
DocumentRoot /home/user/public_html/
....................
.............
</VirtualHost>

The restart Apache.
Now accessing any sub domains will give up the main website page.
This is not what you are looking for. You want the sub domains to point to its respective folder.

Example:
Accessing " test.domain-name.com ", should point to the test folder under " public_html " directory.
To get this done, we can use Rewrite conditions.

Redirecting sub domain to the correct folder

To make each sub domain redirect to its correct folder, you can use the
rewrite rules.
Open the .htaccess file under " public_html " and add the below given entries.

Example:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain\.com
RewriteCond %{HTTP_HOST} ([^.]+)\.domain\.com [NC]
RewriteRule ^(.*)$ https://www.domain.com/%1 [L,R]

<< Previous    |     Next >>
 
© TechCuriosity.com 2006 - 2007. All Rights Reserved.
Designed and Maintained by Telson Thomas
Techcuriosity
Website News
Sponsored Links
• Flash Templates
• Web Templates
• Flash Templates store
• Free website templates
• Free Flash Templates
 
• Advertise Here
 
Help us in our Mission
 
 
Member Login
Username:

Password:

 
Search for Curiosity
 
 
 
Forum Curiosity Topics
• Forum Index
• Operating System's
• Web Hosting
• Programming
• Bioinformatics
• Biology & Bio-Technology
• Computer Security
• Hacking
• General Curiosity
• Jobs
 
Newsletter Signup
 
Subscribe
 
 
• Link Directory
• SiteMap