如何创建一个子域,它们如何工作? [英] How to create a subdomain and how do they work?

查看:163
本文介绍了如何创建一个子域,它们如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的主域名上创建一个子域,以访问我家的覆盆子皮。我的域名注册公司为每个子域收取10英镑,所以我认为可能会有一种更容易(更便宜)的创建方式。如果我更多地了解他们以及如何创建,这也将有所帮助。

I would like to create a subdomain off of my main domain for accessing my raspberry pi at home. My domain register company charges £10 for every subdomain so I thought there might be an easier (and cheaper) way of creating one. It would also help if I knew a little more about them and how they are created.

推荐答案

DNS是由层次结构构建的,用于扩展能力和/或粒度。

DNS is built off of a hierarchy for scale-ability and/or for granularity.

如果我们采用像www.stackoverflow.com这样的域名。并将其分解下来,这是我们得到的。

If we take the a domain like www.stackoverflow.com. and break it down, here is what we get.


  1. www - 这是域的主机部分。它是A记录或CNAME,并最终指向IP地址。

  2. stackoverflow - 这是域级别之一。它拥有自己的DNS服务器和由stackoverflow团队管理的配置。这允许该团队管理特定于他们需求的条目。

  3. com - 这被称为TLD(顶级域名)。在.com中结尾的所有其他域都在comdns服务器上有一个条目。

  4. 。 - 这被称为ROOT。世界各地有20个somodd根DNS服务器。这些服务器用于识别.com,.org,.edu,.gov等dns服务器的位置。

  1. www - This is the host portion of the domain. It is either an A record or a CNAME and eventually points to an ip address.
  2. stackoverflow - This is one of the domain levels. It has it's own DNS servers and config managed by the stackoverflow team. This allows that team to manage the entries specific to their needs.
  3. com - This is called a TLD (top level domain). All other domains that end in .com have an entry on the "com" dns servers.
  4. . - This is called the ROOT. There are 20 somodd root DNS servers scattered around the world. These servers are used to identify where the .com, .org, .edu, .gov, etc dns servers are.

从客户端视角当您查询www.stackoverflow.com时会发生什么:

From a client perspective what happens when you query www.stackoverflow.com is:


  1. 您查询。命名服务器来询问电脑服务器的位置。

  2. 您可以查询com dns服务器,询问stackoverflow dns服务器的位置。

  3. 您查询stackoverflow dns服务器询问www的位置。

子域仅仅意味着您可以在混合中添加额外的DNS服务器层您可以向组合添加更多的扩展能力和/或粒度。

A subdomain simply means that you add an additional layer of DNS servers in the mix so that you can add more scale-ability and/or granularity to the mix.

例如,如果我们的dns名称是:www.foo.stackoverflow.com,我们现在将拥有foo dns服务器层。

For example, if our dns name is: www.foo.stackoverflow.com we would now have the foo dns server layer.

说完,我不认为你需要一个子域名。您可能只需要额外的DNS A记录或CNAME。例如:

Having said that, I do not think that you need a subdomain. You probably just need an additional DNS A record or CNAME. For example:

raspberry.stackoverflow.com而不是raspberry.foo.stackoverflow。

raspberry.stackoverflow.com instead of raspberry.foo.stackoverflow.

他们不应该收取额外的主机条目(A记录或CNAME),仅适用于子域。

They should not charge extra for additional host entries (A record or CNAME), only for subdomains.

这篇关于如何创建一个子域,它们如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆