Setup Set up a partial zone (CNAME setup)
Hướng dẫn chi tiết đồng bộ từ docs Cloudflare — mỗi section có backlink tới đúng vị trí trên trang gốc. Detailed guide synced from Cloudflare docs — each section links to the matching anchor on the official page.
← Danh mục ← CatalogGiải thích nhanh Quick context
Thuộc nhóm Application Services — tập trung bảo vệ, tăng tốc và vận hành ứng dụng/web phía trước origin. Tutorial «Setup» giúp bạn làm quen luồng triển khai thật — phù hợp đọc trước khi mở tài liệu gốc tiếng Anh. Docs gốc chia khoảng 3 bước chính; bản tóm tắt dưới đây giúp bạn nắm khung trước khi làm theo từng lệnh.
A CNAME setup (also known as partial) allows you to use Cloudflare's reverse proxy while maintaining your primary and authoritative DNS provider.
Lưu ý trước khi làm Notes before you start
- Đây là bản tóm tắt trên Orange Cloud Learning Hub — không thay thế tài liệu chính thức. This is a summary on Orange Cloud Learning Hub — it does not replace the official documentation.
- Luôn mở liên kết «Tài liệu gốc» bên dưới khi cần lệnh CLI, snippet code và ảnh minh họa đầy đủ. Open the Official docs link below for CLI commands, code snippets, and full screenshots.
- Docs Cloudflare cập nhật thường xuyên — đối chiếu ngày «Rà soát lần cuối» trên trang gốc khi triển khai production. Cloudflare docs change frequently — verify the Last reviewed date on the official page before production use.
Tổng quan Overview
Phần «Tổng quan» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "Overview" section below — open the official docs link for full screenshots and configuration tabs.
A CNAME setup (also known as partial setup) allows you to use Cloudflare's reverse proxy while maintaining your primary and authoritative DNS provider.
Use this option to proxy only individual subdomains through Cloudflare when you cannot change your authoritative DNS provider. You will be able to create A, AAAA, and CNAME records, which are the DNS record types that can be proxied.
Availability
A CNAME setup (partial) is only available to customers on a Business or Enterprise plan. Partial setups are not supported on Cloudflare Registrar domains.
---
Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs)
Before you begin Before you begin
Phần «Before you begin» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "Before you begin" section below — open the official docs link for full screenshots and configuration tabs.
- Create a Cloudflare account and add your domain.
- Choose Business or Enterprise as your plan.
- If you are onboarding a new domain to Cloudflare, ignore the instructions to change your nameservers.
- (Recommended) Plan for SSL/TLS certificates:
If you are only using Universal SSL prior to converting your zone, a certificate will be provisioned for your subdomains only after each of the respective DNS records (step 3 below) are proxied. Refer to Enable Universal SSL for details. If your domain is sensitive to downtime, instead of using Universal SSL, consider using an advanced certificate with delegated DCV.
Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs)
1. Chuyển đổi your zone và review DNS records 1. Convert your zone and review DNS records
Phần «Chuyển đổi your zone và review DNS records» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "1. Convert your zone and review DNS records" section below — open the official docs link for full screenshots and configuration tabs.
Make sure you have the correct plan
Make sure your zone is on the Business or Enterprise plan. If you have Free or Pro, the options mentioned below will not be displayed.
- On the Overview page, select Convert to CNAME DNS Setup.
- Select Convert to confirm.
- Save the information from the Verification TXT Record. If you lose the information, you can also access it on the DNS Records ↗ page, under Verification TXT Record.
- Make sure that you have all the DNS records (A, AAAA, or CNAME) for subdomains that you want to proxy through Cloudflare.
If you are adding a zone for the first time via API you can add it directly with a type of partial, without converting it.
Required API token permissions
At least one of the following token permissionsis required:
Zone Zone EditZone DNS Edit
Create Zone
curl "https://api.cloudflare.com/client/v4/zones" \
--request POST \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--json '{
"name": "example.com",
"account": {
"id": "YOUR_ACCOUNT_ID"
},
"type": "partial"
}' Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs)
2. Xác minh ownership cho domain 2. Verify ownership for your domain
Phần «Xác minh ownership cho domain» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "2. Verify ownership for your domain" section below — open the official docs link for full screenshots and configuration tabs.
Add the Verification TXT Record at your authoritative DNS provider. Cloudflare will verify the TXT record and send a confirmation email. This can take up to a few hours.
Example verification record
A verification record for example.com might be:
| Type | Name | Content | | ---- | ----------------------------- | ------------------- | | TXT | cloudflare-verify.example.com | 966215192-518620144 |
If your authoritative DNS provider automatically appends DNS record name fields with your domain, make sure to only insert cloudflare-verify as the record name. Otherwise, it may result in an incorrect record name, such as cloudflare-verify.example.com.example.com.
After creating the record, you can use this Dig Web Interface link ↗ to search (dig) for cloudflare-verify.<YOUR DOMAIN> and validate if it is working.
The verification record must remain in place for as long as your domain is active on a CNAME setup on Cloudflare.
If your organization has multiple Cloudflare accounts, also consider using zone holds to have more control over domain ownership.
Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs)
3. Thêm DNS records 3. Add DNS records
Phần «Thêm DNS records» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "3. Add DNS records" section below — open the official docs link for full screenshots and configuration tabs.
- At your authoritative DNS provider:
1. Create CNAME records pointing to {your-hostname}.cdn.cloudflare.net for every hostname you wish to proxy through Cloudflare. Example CNAME record at authoritative DNS provider The CNAME record for www.example.com would be:
www.example.com CNAME www.example.com.cdn.cloudflare.net - Remove any previously existing A, AAAA, or CNAME records referencing the hostnames you want to proxy through Cloudflare. For these hostnames, leave only the records pointing to
{your-hostname}.cdn.cloudflare.net. - Repeat this process for each subdomain that should be proxied to Cloudflare.
---
Other record types Other record types
Phần «Other record types» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.
Read the "Other record types" section below — open the official docs link for full screenshots and configuration tabs.
If you are preparing a conversion from CNAME setup (partial) to primary setup (full), or if you have a more specific use case, you can use the Create DNS Record API endpoint to create DNS records of any supported type.
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/dns/","name":"DNS"}},{"@type":"ListItem","position":3,"item":{"@id":"/dns/zone-setups/","name":"DNS setups"}},{"@type":"ListItem","position":4,"item":{"@id":"/dns/zone-setups/partial-setup/","name":"CNAME setup (Partial)"}},{"@type":"ListItem","position":5,"item":{"@id":"/dns/zone-setups/partial-setup/setup/","name":"Setup"}}]} Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs)
Xem bản đầy đủ trên developers.cloudflare.com (ảnh, tab cấu hình). View the full guide on developers.cloudflare.com (images, config tabs).
Tài liệu gốc ↗ Official docs ↗