# 4.8. Trỏ tên miền từ CloudFlare

#### Bước 1: Đăng nhập vào tài khoản CloudFlare và click chọn vào 1 tên miền bạn muốn cài đặt:

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc6bi5w2lArpNJBxqhx55NbAgNL1gKYbnTxvhC42nQBpJdweYCl-r3wY3LED8LQM92VUWHquYKSq0TKopr3--nGlfaCseIaS4pXTHLh8sPDN-hqWxXcG2VMF-VIevU9h_DL8pMB5Q?key=esCSHIze93gbmIh433_vf-YE" alt=""><figcaption></figcaption></figure>

#### Bước 2: Chọn DNS&#x20;

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXd8FBn5KR-yvTe6m8Ci9Mk59LEHM0ntT0VAF-dpZNbdNjrpwNe7f3eYuuANYG56bRWXhYoj342J5WTxCimtYw0sOlqrS3uXMa4VULxFKeW5O8dqUcoMr1d7G5BZRQ7g6wm8D8VJRQ?key=esCSHIze93gbmIh433_vf-YE" alt=""><figcaption></figcaption></figure>

#### Bước 3: Trỏ tên miền

* **Để trỏ tên miền chính,** bạn cần thêm 2 bản  ghi như sau: \
  (**Lưu ý:** cần tắt hình đám mây).

1. TYPE : A\
   Name: @\
   IPv4 address: 45.32.102.55<br>
2. TYPE: CNAME\
   NAME: www\
   TARGER: dns.shopone.io<br>

   <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc6Si3TzSRneKz2iCSUZAE_KBHDCYk5jpO7nZB4RgqQBI5R_MoOabNL4ckWX-KYVv9pP7YcGKLOdZ_1alU1F7M7YWCgmxKu5IAXz4WZqncIBSIRgABlxMsOdJkLYcr55k_OyHYgDQ?key=esCSHIze93gbmIh433_vf-YE" alt=""><figcaption></figcaption></figure>

* **Để trỏ tên miền phụ:**&#x20;

Giả sử bạn có tên miền **tenmiencuaban.vn**, bạn muốn tạo và sử dụng một tên miền phụ  **sanpham.tenmiencuaban.vn,** bạn cần thêm bản ghi như sau:

Tên record: sanpham\
Loại record: CNAME\
Giá trị record : dns.shopone.io

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfGqaZ8KJyU2rvQDmohLp0D93m3HsLv57D3cTK_pJKACcH5z10AVODQXSh6liaotlXeM2lxZKXBkl8oz3_bWBFlmStgK2F6x-uBcPRtsMLNVUqWlrcWHu4fO5V01Qn5LmzfFXrp?key=esCSHIze93gbmIh433_vf-YE" alt=""><figcaption></figcaption></figure>

### **Thủ thuật Page Rule điều hướng**&#x20;

Chuyển từ không có "www" (<https://tenmiencuaban.vn>) sang có "www" (<https://www.tenmiencuaban.vn>)

Vào **Dashboad** của CloudFlare -> chọn **Page Rules** -> **Create Page Rule**.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfPriEUsCdOjzSY-hhhew6d6Sd22IDpH53jDVNdA8qanmhbbGnToQMo0x_gLa690r12MkI0-c94q1-MSaKBy4XMAa4Wnx0Mc_TGQienh1ceJ-KPJr2si_lt6becPvRoYL0jloPPJQ?key=esCSHIze93gbmIh433_vf-YE" alt=""><figcaption></figcaption></figure>

Điền các thông tin lần lượt như sau:

* Điền URL **không có "www".**
* Chọn Settings: **Fowarding URL + 301 - Permanent Redirect.**
* Điền URL **có "www".**

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeP-LbWnV-aK0JeY2Owk-SYvJgJdpVfqhpJ-qqMry1K47f8qw3a_xEf9B18pRbj3wp51_m_mUupQ4Gje-XVeXKobTTPVaOPXf5k52pUh9yitHFP692zpddSxyh4Skk--A-uwaeJ?key=esCSHIze93gbmIh433_vf-YE" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://docs.shopone.io/cai-dat-ten-mien/tro-ten-mien-tu-mot-so-nha-cung-cap-pho-bien/tro-ten-mien-tu-cloudflare.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
