Add a domain - Step By Step - 4 Noobs

Discussion in 'DNS/Domain names' started by Augustus, Jul 29, 2010.

  1. First off I'm a noob here at Winhost.

    If your experience with adding a domain to your site resembles this: [​IMG]

    Then this guide may be for you.​

    Add a, or multiple, domain(s) - Step By Step

    Step 1. - Get a domain.

    Register a domain. If you have a Winhost account we'll assume you are ok with that part.
    You will need to change the nameservers to the Winhost nameservers (again you should know how to do this part too)

    * Note: The following steps do not need to be done in any specific order they all just need to be completed.

    Step 2. Setup a Domain Pointer

    Login to your Winhost account and got to the Sites tab and click the 'Manage' link under your main domain. Under the Site Tools tab click on Domain Pointer.
    Click Add and enter the domain name. (Check Enable Email Alias -if you want that functionality - if you don't know what that is then search it in the forums/knowledgebase)
    Click Create when done.

    Step 3. Create a subfolder for the new domain/site

    Using your favorite FTP program login to your site and create a subfolder from the main directory. For good measure create a default page in the folder.

    Step 4. -Install IIS Manager

    Follow the directions in this Knowledge Base Article to install and configure your access to the IIS Manager.

    Step 5. - Create a Rewrite Rule in IIS Manager

    After loging in to your site in the IIS Manager

    under the IIS Section click the URL Rewrite application. (It's the last application on the bottom of the page)

    On the right menu select Add rules
    Under Inbound Rules select Blank Rule

    Give this Rule a name

    complete the Match URL section as follows:
    Requested URL= Matches the Pattern
    Using = Regular Expressions
    Pattern = .*
    Check box Ignore case

    complete the Conditions section as follows:
    Input = {HTTP_HOST}
    *Note:You may run across forum posts or KB articles that say use {HTTP+POST}. That works but the domain resolves to when you input Using HTTP_HOST the domain will resolve to just but still point to the subfolder we created for it in Step3

    Type = Matches The Pattern
    Pattern =^www.sitename\.com$
    Note: if you want be able to put in the address bar and it resolve to (Which at this point it will resolve to http// you will need to create a new rule and use this Pattern ^mynewdomain\.com$

    complete the ACTION section as follows:
    Action Type = Rewrite
    Action Properties = \subfolder\{R:0}
    Check box Append query string

    Click Apply - located on top of the menu on the right side.

    Close or minimize IIS Manager

    Step 6. Create an Application Starting Point

    Under Site Tools - Click Application Starting Point
    Type in the subfolder or browse to it
    Click Create then close the Application Starting Point app.


    Step 7. Add the redirect script

    Reference This KB Article
    -this article shows how to redirect subdomains but the same applies to domains.

    Create the following at the top under the Language Tag, in the Default/index page on your MAIN SITE

    If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("") ) > 0 Then
    ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("") ) > 0 Then
    ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("") ) > 0 Then
    End If

    The ElseIf statements here can be deleted if you are only doing 1 domain. If you think you may do more later you can comment the ElseIf statements out by putting an apostrophe (') in front of the line beginning with ElseIf or just delete them.

    Drum roll please....

    Go out to the web and type in your browser's address bar and it should show the default page. The url should show

    To add multiple domains just repeat. Just make sure you add the ElseIf statements shown in Step 7.

    Please be aware that I have created this post from combining info from many posts, requests for help, and KB articles. I don't have the answers as to WHY some of these steps function as they do - Particularly the IIS Manager (I need to run through the manual more).

    IF YOU STILL NEED HELP - Please post a question. I may not be able to answer it but someone else may.

    Hope this helps.
    Last edited by a moderator: Oct 14, 2015

Share This Page