このチュートリアルでは、CloudflareのCDNやWAFサービスを使用せずに、Cloudflare DNSを使用する方法について説明します。CloudflareのDNSサービスを単独で使用する利点(セキュリティの向上、DNS解決の高速化、コスト削減など)を探ります。このチュートリアルは、CDNやWAFの複雑さやコストを追加することなく、ウェブサイトのセキュリティを強化したい方に役立つことでしょう。
Cloudflare Managed DNSは、最速のレスポンスタイム、比類のない冗長性、内蔵のDDoS緩和とDNSSECによる高度なセキュリティを提供するエンタープライズグレードの権威付けDNSサービスです。
Cloudflare
Cloudflareが主張していることは本当ですか?
DNSPerfのデータによると、Cloudflareが提供する権威あるネームサーバーは、世界で最も高速なサービスです。👏

あなたがドメイン名を購入したときにレジストラは、通常、低速で信頼性の低いされているデフォルトのネームサーバーを割り当てます。別のケースでは、いくつかのホスティングプロバイダはまた、迅速にすべてのDNSエントリを整列するために彼らのネームサーバーを提供していますが、それは同じ物語を持っています。
CloudflareをDNSのみに使用する理由は?
Cloudflare Free PlanはCDN用途にはお勧めしませんが、DNS用途には十分です。しかし、DNSサービスとしては十分な性能を持っています。
特に無料プランで従来のCloudflareプロキシを設定した場合、ウェブサイトが速くなる代わりに遅くなることがあります。その根本的な理由は、ISPとのダイレクトピアリングがない、ルーティングが悪い、プランの選択が悪い、などです。
CloudflareをDNS目的にのみ使用すると、より高速で安全なのでおすすめです。アカウントには2段階認証システムも付いています。
ステップ1. Cloudflareアカウントにログイン
- Cloudflareを利用したことがない方は、サインアップしてください。無料です。
- すでにお使いの方 Login to dashboard

ステップ2. 二要素認証に合格する
- 二要素認証を利用している場合は、OTPを入力してこのステップを完了させてください。

ステップ3.新しいウェブサイトを追加する
- Cloudflare Dashboardへのログインが完了したら、Add a siteボタンをクリックします。

- ドメイン名を入力し、Add siteボタンをクリックします。

ステップ4.フリープランを選択します。これで十分です。

ステップ5. プロキシとDNSサインを理解する
- すべてのDNSエントリについて、Gray CloudがDNS解決のみのモードであることを確認します。

ステップ6. スキャンされたエントリーを確認する
- Cloudflareは、過去のDNSレコードをすべてスキャンし、すべてのレコードを正しくリストアップするよう最善を尽くしています。稀に、いくつかのレコードが見落とされたり、何度も繰り返されたりすることがあります。そのような場合は、以前の権威あるネームサーバーのDNSマネージャーを使用して手動で検証することをお勧めします。これは、ダウンタイムを防ぐために重要です。
- 各レコードのProxy Statusで、ProxiedからDNS resolution only modeに変更します。
- これがCloudflareの最大の特徴で、レコードごとにきめ細かい制御が可能です。

ステップ7. 新しい権威あるネームサーバーを更新する
- ドメインレジストラ(ドメインを購入した会社)にログインします。
- ヒント:DNSセクションの下に、Cloudflareが提案するネームサーバーを更新するオプションがあります。ネームサーバーの更新方法がわからない場合は、GoDaddy、Namecheap の関連ドキュメントを参照してください。

- 私たちの場合は、Google Domainsなので、そちらで更新します。

- 完了したら、Doneをクリックし、ネームサーバーをチェックします。

- ネームサーバーのプロパゲーションは、dnscheckerサイトで確認することができます。
- 完了または後でセットアップをクリックして、Cloudflare onbordingの提案をスキップしてください。

- Cloudflareは、お客様がネームサーバーをCloudflareに指定しているかどうかを定期的にチェックします。何度もRe-check nowをクリックしても、処理が速くなることはありません。
- ネームサーバーのプロパゲーションが終了すると、Cloudflareからメールが届き、”Great news! Cloudflare is now protected your site “というメッセージが表示されます。

DNS Analyticsのレポートも取得できます。




Cloudflare DNSを使うべきですか?
はい、Cloudflare DNSは信頼できる汎用的な使用例です。 しかし、CNAME Flatteningの目的では決して使用しないでください。
ISPの多くのPublic DNSサーバーで、ドメインが地域IPアドレスに期待通りに解決されないことを発見しました。
試験方法
- gulshankumar.net を gushankumar.b-cdn.net に CNAME でポイントしています。
- すべてのDNSサーバーが地域IPのみを回答することを期待していたが、そうはならなかった。
- wwwのようなサブドメインは正常にルーティングされましたが、裸のドメインはできませんでした。
グッドケース






バッドケース






Cloudflare DNSは無料で使えますか?
Cloudflareの権威DNSサービスは無料で、ネットワーク上のドメインに対するDNSクエリーを制限することはありません。
Cloudflareでバニティ・ネームサーバを取得する方法は?
ns1.gulshankumar.net、ns2.gulshankumar.netなどのバニティネームサーバーは、クラウドフレアのビジネスおよびエンタープライズプランで利用できるプレミアム機能です。
Cloudflare DNSを使用しますか?
Cloudflare DNSサービスは、CNAME Flatteningのユースケースを除いて、一般的な用途では信頼性が高いです。
hi
what CDN do you recommend for an ecommerce ?
You can go with BunnyCDN.
Hi Gulshan,
What when I use CF SSL/TLS cert for my site? If I make it a grey cloud [i.e., only using CF DNS] can’t use SSL cert as it becomes invalid.
Get browser warnings, cannot access site.
thx
You cannot use CF TLS while having DNS only mode [Gray Cloud]. If you want to use Cloudflare for DNS only, your origin server must have a valid cert such as Let’s Encrypt/Comodo.
In my CloudFlare account I have my
example.com
andwww.example.com
created with a CNAME that point to example.b-cd.net URL. All “A” records are deleted.I get a warning next to one of them in CloudFlare. There is an “i” that when I hover over it in CloudFlare it says “Another record shares the same name, so we’ve applied CNAME flattening.”
What am I doing wrong?
Trying to enable SSL in Bunny.net for my naked domain (example.com) doesn’t work. I keep getting an error that says it’s not pointing to Bunny, but it is. It’s just that CloudFlare is flattening the naked domain. I don’t understand what I’m doing wrong. I’ve been at it for hours. Thank you!
You need to point DNS records as below.
CNAME –
example.com
—– b-cdn.net – DNS only modeCNAME –
www
—– b-cdn.net – DNS only modeThen only you can install SSL cert at bunny.net panel for your Pull Zone.
yes, CNAME flattening message is perfectly normal because we are using it.
Perfect! I got it working… but my Google page speed score took a 20 point dive. However, my GTmetrix score is great!
Google is warning me “Eliminate render-blocking resources” and there are a bunch of css and js scripts on the Bunny CDN that it’s referring to. Did I do something wrong?
https://imgur.com/zUVifjo
Well, the reported issue ‘Eliminate render-blocking resources’ is a different topic. You can safely ignore it. In the age of HTTP/2, Pages load really quick.
What should be the cloudflare cache level? Should I set it to standard or I need to bypass cache?
Can bunnycdn do cache like cloudflare?
Standard. For BunnyCDN caching, read this tutorial.
I’ve set to standard. Now if I bypass caching of my site using cloudflare page rules will the site become slow?
Or I should use it combining with bunnycdn?
Hi , if I use dns only will it expose my origin ip?
Yes, it will expose the address where you will point.
Is it advisable for me to use cloudfire free plan?. I just want to improve my page loads. Thanks
Do you want to use Cloudflare for DNS or Proxy purpose? Using for DNS is fine for anyone. In case of a proxy, you can use Cache Everything for a better experience.
I’m not really sure about that but I’ve use cloudfire as the nameservers and most of DNS records are proxied through cloudfire. And how do I use the cache everything options? I’m on blogger platform
I am afraid, I can’t suggest anything about Blogger (Google Blogspot) platform.
Ok, thanks for your time
I got very bad scores when i am using Cloudflare CDN, i setup my server with nginx, redis, pagespeed module for nginx and i have a better speed and stats.
Enable APO and Argo, see the magic.