A host header is a third piece of information that you can use in addition to the IP address and port number to uniquely identify a Web domain or, as Microsoft calls it, an application server. In SharePoint 2010, host headers can be applied at two different levels :
The Web application (IIS Web site) level
The site collection level
A host-named site collection allows you to address a site collection with a unique DNS name. A SharePoint Web Application when created contains many path-based site collections that share the same host name (DNS name). For example, Team A has a site collection at http://abc.com/sites/teamA, and Team B has a site collection at http://abc.com/sites/teamB. These are referred to as path-based site collections, and is the recommendation for most corporate scenarios. Host named site collections enable you to assign a unique DNS name to site collections. For example, you can address them as http://TeamA.abc.com and http://TeamB.abc.com allowing for scalability. This is a feature of SharePoint that allows individual site collections to have their own top-level URL.
The following code snippet programmatically creates the host-named site collection with the URL https://sharepointzen.wordpress.com in the SharePoint Server 2010 Web application with the URL https://sharepoint
SPWebApplication webApp = SPWebApplication.Lookup(new Uri("http://sharepoint")); SPSiteCollection sites = webApp.Sites; SPSite Site = sites.Add(“https://sharepointzen.wordpress.com”, "Test", "Test Site", 1025, "STS#0", "domain\abc","Arshad Riz", “firstname.lastname@example.org”, "domain\abc1”,"Ak Riz", email@example.com, true);
PowerShell can also be used in place of server object model code. Please refer to : http://technet.microsoft.com/en-us/library/cc424952.aspx