域控dns无法解析域控_域注册商,DNS和托管

域控dns无法解析域控

by ᴋɪʀʙʏ ᴋᴏʜʟᴍᴏʀɢᴇɴ

由ᴋɪʀʙʏᴋᴏʜʟᴍᴏʀɢᴇɴ

域名注册商,DNS和托管 (Domain registrars, DNS, and hosting)

如何正确设置网站 (How to set up your website the right way)

It took me a while to set up the infrastructure that runs my website and email in a way that made me happy. There are a lot of crappy domain registrars, DNS providers, and web hosts out there. I’m finally in a place where I’m pleased with each component in my pipeline, so I thought I’d share my setup with the world.

我花了一些时间来建立可以让我感到高兴的方式来运行我的网站和电子邮件的基础结构。 那里有很多糟糕的域名注册商,DNS提供商和网络主机。 我终于到了一个令我满意的地方,我想与世界分享我的设置。

便宜货 (Namecheap)

Back in the day I, like many other people, used GoDaddy as my primary domain registrar. Quickly I learned that GoDaddy spends all of their money on fancy advertising instead of hiring UX engineers or product managers. Their support team was subpar as well during my time there.

过去,我和其他许多人一样,使用GoDaddy作为我的主要域名注册商。 很快,我得知GoDaddy将所有的钱都花在了精美的广告上,而不是雇用UX工程师或产品经理。 在我在那里期间,他们的支持团队也表现不佳。

Nowadays, I only use Namecheap for my domain needs. Namecheap is by far the best interface I’ve found for managing domains and it gets better every time I use it. They also always have great deals on new TLDs and searching for a great domain on their site is always a fantastic experience.

如今,我仅将Namecheap用于我的域需求。 到目前为止,Namecheap是我发现的用于管理域的最佳界面,并且每次使用它时都会变得更好。 他们在新TLD方面也总是有很多优惠,并且在他们的网站上搜索出色的域名总是一种奇妙的体验。

CloudFlare (CloudFlare)

Every domain registrar will provide you with the ability to configure your DNS settings for your domain, but no free nameserver service can really compare to CloudFlare. I don’t want to take too much time explaining all of the amazing things that CloudFlare can do for you because this video already does an incredible job.

每个域注册商都可以为您的域配置DNS设置,但是没有免费的域名服务器服务可以与CloudFlare相比 。 我不想花太多时间解释CloudFlare可以为您做的所有令人惊奇的事情,因为该视频已经完成了令人难以置信的工作。

If you watched that video, then you know about a lot of the awesome features that CloudFlare provides to its users for free. My absolutely favorite feature though, is surprisingly de-emphasized on CloudFlare’s site. The number one reason I use CloudFlare is because I never have to wait on DNS propagation.

如果您观看了该视频,那么您将了解CloudFlare免费提供给用户的许多很棒的功能。 但是,我绝对喜欢的功能在CloudFlare的网站上却被意外地忽略了。 我使用CloudFlare的第一个原因是因为我不必等待DNS传播

GitHub页面 (GitHub Pages)

Hosting a website can also be quite a pain. If you just need to host a static website, then there is no reason you need to pay for hosting. My personal favorite solution is GitHub Pages. I already use git to manage my website, so GitHub Pages makes updating my website as easy as git push. No more FTP, SSH, or any other three letter acronyms.

托管网站也可能会很痛苦。 如果您只需要托管一个静态网站,则没有理由需要为托管付费。 我个人最喜欢的解决方案是GitHub Pages 。 我已经使用git来管理我的网站,所以GitHub Pages使更新我的网站像git push一样容易。 不再需要FTP,SSH或任何其他三个字母的缩写。

设定 (Setting it up)

By now you should have a good high-level overview of how to setup your website, but there can be small implementation details that still make connecting the dots difficult. Here are all the steps you need to follow in order to utilize the above services:

到现在为止,您应该已经对如何设置网站有了一个很好的高级概述,但是可能有一些小的实施细节,仍然使连接各点变得困难。 要使用上述服务,您需要遵循以下所有步骤:

1.在Namecheap上获取您的域名。 (1. Get your domain on Namecheap.)

It doesn’t matter if you buy it directly or transfer it, but get your domain on Namecheap.

您直接购买或转让它都没有关系,但可以在Namecheap上获得您的域名。

2.将您的站点添加到CloudFlare。 (2. Add your site to CloudFlare.)

On CloudFlare add your site, scan the current DNS records, and select the free plan. Once you’ve done that, you’ll be prompted with two nameserver addresses. Save these for the next step.

在CloudFlare上,添加您的站点,扫描当前的DNS记录,然后选择免费计划。 完成此操作后,系统将提示您两个名称服务器地址。 保存这些以进行下一步。

3.将Namecheap指向CloudFlare。 (3. Point Namecheap to CloudFlare.)

Go back to Namecheap, click the “Manage” button corresponding to your domain from the main “Dashboard” page. Under the “Nameservers” section click “Namecheap Basic DNS”, and then select “Custom DNS.” From here, enter the two nameservers you got from CloudFlare and click the green checkmark.

返回Namecheap,在“主页”主页上单击与您的域相对应的“管理”按钮。 在“名称服务器”部分下,单击“ Namecheap基本DNS”,然后选择“自定义DNS”。 在此处,输入您从CloudFlare获得的两个名称服务器,然后单击绿色的选中标记。

4.检查名称服务器。 (4. Check the nameservers.)

Awesome, now go back to your site on CloudFlare and click “Recheck Nameservers.” This can take up to 24 hours, but often (especially with Namecheap) it only takes a few minutes.

太棒了,现在回到CloudFlare上的站点,然后单击“重新检查名称服务器”。 这最多可能需要24个小时,但是通常(特别是使用Namecheap)只需几分钟。

5.设置GitHub Pages。 (5. Setup GitHub Pages.)

Head over to GitHub and create a new repo called username.github.io, where username is your username on GitHub. From here you can push your static website up with the following commands:

转到GitHub并创建一个名为username .github.io的存储库,其中username是您在GitHub上的用户名。 在这里,您可以使用以下命令来启动静态网站:

# from your website directory on your local machine$ git init$ git add .$ git commit -m ‘Initial commit’
# replace “<remote-url>” with the URL on your repo page on GitHub$ git remote add origin <remote-url>$ git push -u origin master
6.将您的DNS指向GitHub Pages。 (6. Point your DNS to GitHub Pages.)

You can now go back to your site on CloudFlare and click “DNS” at the top. From here you’re going to want to add a CNAME record. The first value (name) will be “@” and the second value (domain name) will be username.github.io, where username is your username on GitHub.

现在,您可以返回到CloudFlare上的站点,然后单击顶部的“ DNS”。 在这里,您将要添加CNAME记录。 第一个值(名称)将为“ @”,第二个值(域名)将为用户名 .github.io,其中用户名是您在GitHub上的用户名。

Unless you have some subdomains or other special circumstances, you can delete any other CNAME or A records off of CloudFlare. Just to be safe though, I’d suggest you backup your DNS records by clicking, “Advanced” and “Export.”

除非您有某些子域或其他特殊情况,否则可以从CloudFlare删除任何其他CNAME或A记录。 为了安全起见,我建议您通过单击“高级”和“导出”来备份DNS记录。

I personally don’t like the “www” that prefixes a lot of domains. I get rid of this by adding another CNAME record with first value “www” and second value username.github.io, where username is your username on GitHub.

我个人不喜欢前缀很多域名的“ www”。 通过添加另一个具有第一个值“ www”和第二个值用户名 .github.io的CNAME记录,我摆脱了这一点,其中username是您在GitHub上的用户名。

7.在GitHub上添加一个CNAME文件。 (7. Add a CNAME file on GitHub.)

The last step in this process is to tell GitHub Pages about our domain. We do this by adding a file called “CNAME” to the root directory of our website’s repository on GitHub. To do this run the following commands:

此过程的最后一步是告诉GitHub Pages有关我们的域的信息。 为此,我们在GitHub上网站存储库的根目录中添加了一个名为“ CNAME”的文件。 为此,请运行以下命令:

# from your website directory on your local machine
$ echo “<my-domain>” >;> CNAME # where “<my-domain>;” is your domain$ git add CNAME$ git commit -m ‘Add CNAME’$ git push origin master

If you found this post useful or if you have any recommendations feel free to post a response here.

如果您认为此帖子有用,或者有任何建议,请在此处发表回复。

Follow me on Twitter here.

按照我的Twitter 这里

翻译自: https://www.freecodecamp.org/news/domain-registrars-dns-and-hosting-353e4163a19/

域控dns无法解析域控

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
DNS的查询过程      如查询过程的初始步骤所示,DNS 名由本机的程序使用。该请求随后传送至 DNS 客户服务,以通过使用就地缓存的信息进行解析。如果可以解析查询的名称,则查询将被应答,并且此过程完成。其中,本地解析程序的缓存可从以下2个可能的来源获取名称  信息:      ● 如果主机文件就地配置,则来自该文件的任何主机名称到地址的映射都将在DNS 客户服务启动时预先加载到缓存中。      ● 从以前DNS查询应答的响应中获取的资源记录将被添加至缓存并保留一段时间。      如果此查询不匹配缓存中的项目,则解析过程继续进行,客户机查询 DNS 服务器来解析名称。      接下来查询 DNS 服务器,当本地的DNS不能就地解析查询时,可根据需要查询 DNS 服务器来解析名称。如图4-1所示,客户机将查询首选 DNS 服务器。在此过程中使用的实际服务器是从全局列表中选择的。当 DNS 服务器接收到查询时,首先检查它能否根据在服务器的就地配置区中获取的资源记录信息作出权威性的应答。如果查询的名称与本地区信息中的相应资源记录匹配,则服务器作出权威性的应答,并且使用该信息来解析查询的名称。      如果查询的名称没有区信息,则服务器检查它能否通过本地缓存的先前查询信息来解析名称。如果从中发现匹配的信息,则服务器使用它应答查询。接着,如果首选服务器可使用来自其缓存的肯定匹配响应来应答发出请求的客户机,则此次查询完成。      如果查询名称在首选服务器中未发现来自缓存或区信息的匹配应答,则查询过程可继续进行,使用递归来完全解析名称,包括来自其他 DNS 服务器的支持,以帮助解析名称。在默认情况下,DNS 客户服务要求服务器在返回应答前使用递归过程来代表客户机完全解析名称。在大多数情况下,DNS 服务器的默认配置支持递归过程,如图4-2所示。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值