> For the complete documentation index, see [llms.txt](https://docs.thaidata.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thaidata.cloud/cloud-web-hosting/web-hosting/dns-cloudflare.md).

# ทำ DNS ใช้เองด้วย Cloudflare ฟรีและปลอดภัยมากขึ้น

Cloudflare คือบริการยอดนิยมที่มีชื่อเสียงในด้านการป้องกันเซิร์ฟเวอร์ การบุกรุกเข้าถึง ด้วยการเป็นหน้าด่าน Firewall ให้กับเซิร์ฟเวอร์ โดยมีการปิดบัง IP เซิร์ฟเวอร์ที่แท้จริงไว้ เราจึงสนับสนุนและแนะนำอย่างยิ่งที่จะให้ลูกค้าได้ใช้บริการของ Cloudflare

Cloudflare คือผู้ให้บริการด้าน CDN (Content Delivery Network), DNS Server และยังมีเรื่อง Security ป้องกันการโจมตีแบบ DDoS Protection ให้กับเซิร์ฟเวอร์ โดยมีการปิดบัง IP เซิร์ฟเวอร์ที่แท้จริงไว้ การใช้บริการ Cloudflare มีทั้งบริการแบบเสียค่าบริการและแบบฟรี

ลูกค้าสามารถนำ Cloudflare มาใช้งานเป็น DNS Server ได้ แม้จะเป็นแพคเกจแบบฟรีก็สามารถป้องกันการบุกรุกให้กับเซิร์ฟเวอร์ของลูกค้าได้

**เริ่มต้นกันเลย**

ลงทะเบียนที่ <https://dash.cloudflare.com/sign-up>

<figure><img src="https://support.thaidata.co.th/index.php?rp=/images/kb/109_Screen_DNS_Cloudflare_1.jpg" alt=""><figcaption></figcaption></figure>

เมื่อทำการ Login เข้ามาใน Cloudflare ให้คลิกที่ **Add site** และกรอกชื่อโดเมนเนมของลูกค้าและคลิกปุ่ม Add site อีกครั้ง (ในขั้นตอนนี้ลูกค้าต้องมีโดเมนเนมอยู่แล้ว)

<figure><img src="https://support.thaidata.co.th/index.php?rp=/images/kb/149_CloudFlare_add_site.jpg" alt=""><figcaption></figcaption></figure>

3\. การเลือกแพคเกจจะมีแบบเสียค่าบริการและแบบฟรี แต่ให้ลูกค้าเลือกแบบฟรีข้างล่างสุด จากนั้นคลิกที่ **Continue**

<figure><img src="https://support.thaidata.co.th/index.php?rp=/images/kb/111_Screen_DNS_Cloudflare_3.jpg" alt=""><figcaption></figcaption></figure>

4\. จากนั้นคลิกที่ **Add record** โดยระบุแทนด้วยชื่อโดเมนเนมและหมายเลข **IP VPS Server** ของคุณและกด **SAVE**

<figure><img src="https://support.thaidata.co.th/index.php?rp=/images/kb/112_Screen_DNS_Cloudflare_4.jpg" alt=""><figcaption></figcaption></figure>

5\. คลิกที่ **Continue** และนำ **NameServer** ที่ Cloudflare กำหนดให้ ไปตั้งค่า **DNS** ของโดเมนเนม หากลูกค้าจดโดเมนเนมกับผู้ให้บริการใด สามารถนำค่านี้ไปแจ้งผู้ให้บริการโดเมนเนมทำการกำหนดให้ได้เลยค่ะ

<figure><img src="https://support.thaidata.co.th/index.php?rp=/images/kb/113_Screen_DNS_Cloudflare_5.jpg" alt=""><figcaption></figcaption></figure>

\ <br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.thaidata.cloud/cloud-web-hosting/web-hosting/dns-cloudflare.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
