Second-level domain name third-level domain name setting method

Source: Internet
Author: User

Because the website needs to set level 2 and level 3 domain names, write something out, let's take a look.
For example, if your domain name is haoday.com, you need to add a second-level domain name bbs.haoday.com. Of course, www.haoday.com is also a second-level domain name, just change bbs to www when adding a record.
Second-level domain name setting method:
1. If your domain name is registered on haoday.com, go to the domain name management control panel. I will use xinnet as an example here (highly recommended)
2. Click mydns;
3. Click "Add a new a record ";
4. In the pop-up window, enter BBS (note: the name of the second-level domain name) and click OK;
5. Enter the IP address you want to point to in the next window and click OK;

 

6. IIS:
Create a new website and add the domain name bbs.haoday.com to the host.

 

Apache:
Open the configuration file CONF/httpd. conf and add a VM.
Configuration (as follows ):
Serveradmin abc@haoday.com
DocumentRoot D:/idc918/haoday.com/
Servername www.haoday.com
Serveralias haoday.com wwww.haoday.com
Errorlog logs/www.haoday.com-error_log
Customlog logs/www.haoday.com-access_log common
Errordocument 404/404 .html
Description
Virtualhost, binding IP
Serveradmin is the administrator's mailbox.
DocumentRoot is the site document directory of the VM.
Servername, domain name.
Serveralias haoday.com wwww.haoday.com, bind Domain Name
Errordocument 404/404. html: defines the 404.html file under the site's root directory on the 4th page of the site.
7. After a few hours, you can use your second-level domain name after the DNS server is refreshed.

 

Apache:
open the configuration file CONF/httpd. CONF file, add a virtual host
Configuration (as follows):
serveradmin abc@haoday.com
DocumentRoot D: /idc918/haoday.com/
servername haoday.com
serveralias * .haoday.com
note that the preceding haoday.com must be changed to your domain name. For a third-level domain name, change to * .w1.haoday.com
IIS:
1. First, create a new site
2. Leave the Host Header blank
so that the wildcard domain name supports
you can try to use abc.haoday.com or 3.w1.haoday.com and other domain names that have not been registered in the domain name panel for access, the results all point to the host you just set. Of course, this only points to the same address, the following is how to direct the website program to different directories.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.