How to create a sub-domain on a website?

2008-12-04 11:33 pm
Can anyone tell me how to create a sub-domain on a website. Like how when you come to Yahoo the address bar says "www.yahoo.com" and now when your at the answers section it says "www.answers.yahoo.com". Can anyone tell me how to do that? (Without buy a separate domain name :| )

回答 (2)

2008-12-04 11:53 pm
✔ 最佳答案
You don't have to buy a separate domain name to create subdomains. Basically, all you're doing is create a new DNS record.

For example, if you want to create a sub.domain.com and you want to point it to a specific IP, you'll be creating a A record like this:

sub IN A 12.34.567.89

If you want to create a subdomain and point it to another website, you'll be creating a CNAME record, like this:

sub IN CNAME www.anotherdomain.com
2008-12-04 11:52 pm
It depends on who is hosting your website and who is hosting your domain name.
What you need to do is to add a CNAME record in your DNS setup, pointing to the host name/ip address of the server that will be hosting the subdomain (this varies based on who provides your domain name). Then you need to configure your web host to respond to requests to that subdomain.
To give you a definitive answer, we need to know who you are hosting your website and domain name with.


收錄日期: 2021-05-03 14:01:06
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20081204153323AApZUbM

檢視 Wayback Machine 備份