Leverage Cloudflare for free via domestic ICP-filed cloud hosts to achieve fast access to domestic sites from abroad
本文最后更新于 287 天前,其中的信息可能已经有所发展或是发生改变,如有失效可到评论区留言。
Article Abstract
The solution of combining an ICP-filed cloud host with Cloudflare to enable overseas access to domestic sites solves the problem of low resource utilization of ICP-filed domain names. This method utilizes the proxy function of Cloudflare's free version to point the authoritative DNS of the ICP-filed domain name to Cloudflare, and configures a reverse proxy to forward traffic to the domestic cloud host. This both retains domestic compliant access capabilities and achieves accelerated access for overseas users. During practice, attention should be paid to the separation strategy of ICP-filed and non-ICP-filed domain names, as well as the reasonable configuration of SSL certificates. Ultimately, while reducing cloud host costs, it provides a stable technical path for cross-border access, suitable for website deployment scenarios that need to balance both domestic and overseas access needs.
Qwen3-14B · 2026-06-18

Preface

Actually, speaking of the requirement in the title, it doesn't seem to make much sense now, because if it's just about using Cloudflare to enable fast overseas access to domestic sites, there are too many ways (tunnel, custom host). The reason I considered this issue at the time was that in order to solve the ICP filing issue, I had already spent up to over 20 yuan per month to buy a high-end lightweight server from Tencent Cloud. Although many applications were already running on it (uptime-kuma, bind9, redis, cryptgeon, komga, shlink server, bark, tailscale relay server), the resources were still not fully utilized:

image.png

I always felt that spending this 20-odd yuan was a bit of a waste, so I kept wanting to find more things for the cloud host to do. Since my ICP-filed cloud host has a perfectly legitimate HTTPS port 443, it shouldn't go to waste. That's why I decided to mess around with this (if you don't have an existing ICP-filed domain name, this method is not recommended; please refer to my other article:Unorthodox Tricks Series: Leveraging Home Broadband Without Public IP to Get Cloudflare for Free to Quickly Build a Website (Universal))。

Preparation

Prepare a brand new or idle domain name and complete the ICP filing, assuming it is example1212.com. This is because Cloudflare's free version sites do not support adding subdomains:

image.png

Therefore, the authoritative DNS corresponding to the entire example1212.com must be pointed to Cloudflare (actually, there is also the ”custom hostname” method, but that is more troublesome, and I will write a separate article about it when I have the chance).


Actually, a brand new (or idle) domain name is not necessarily required here; an active one works too. The already configured records can actually be imported into Cloudflare, but on one hand, because many hosts under the domain name I currently use are using Tencent Cloud's CDN, and I don't want to mess around with CNAME; on the other hand, I'm also worried that if everything is put on Cloudflare, in case mainland China performs negative optimization against Cloudflare again, it will affect normal access~, so I might as well just use a new domain name for the experiment. (Supplementary note: After messing around for a while, I think the best solution is to have 2 domain names, one ICP-filed specifically for domestic access, and one non-ICP-filed, specifically for overseas access and as a backup when problems arise with the domestic domain name. It is best to transfer this non-ICP-filed domain name directly to Cloudflare, rather than keeping it managed by a domestic domain registrar).

Actually, there is also a compromise method, which is to point the authoritative DNS of the domain name currently in use to Cloudflare in the DNS service provided by your domestic domain name provider (such as Tencent Cloud's DNSPod or Alibaba Cloud DNS resolution), and Cloudflare uses NS records to delegate specific subdomains back to your domestic domain name provider for resolution. This way, through advance planning, Cloudflare and the domestic domain name provider can each be responsible for their own resolution. This method is supported by the free versions of the DNS solutions of both domestic domain name providers mentioned above. This method requires adding a TXT record on CF based on the information provided by the domestic domain name provider to pass the domestic domain name provider's verification, and adding NS records on CF based on the DNS servers provided by the domestic domain name provider after verification. I will write a separate article about this in the future.


Have a Cloudflare account; if you don't have one, register one.

Have a cloud host with a public IP address and an already ICP-filed domain name.

Add a domain name on CF

Log in to Cloudflare, click ”Add a Site” in the red box at the very top, or ”Websites” - “Add a Site”, as shown below:

image.png

Enter your domain name example1212.com in the red box in the image below, and then click Continue below:
image.png

Select the Free plan in the red box in the image below (feel free to choose others if you are rich) and then click Continue:
image.png

The following page appears:
image.png

Records will be added uniformly later. Click Continue below directly, and the interface shown below will appear:
image.png

After clicking Confirm, the interface shown below will appear:
image.png

The part in the red box is the authoritative DNS of CF that we need to point to at the domestic domain name provider in the next section
address, and finally click Finish in the interface below. At this point, you can already see the domain name we just added in the websites list.
image.png

Modify the authoritative DNS address pointed to by the ICP-filed domain name

Log in to the DNS operation panel provided by the domestic domain name provider (taking Tencent DNSPod free version as an example), search for ”Domain Registration” in “Console” - ”Product Management” and press Enter:

image.png

Click ”My Domains” in the red box, select the ”More” drop-down menu on the far right of the domain name to be operated, and then select ”Modify DNS Server”, as shown below:
image.png

Entered the following interface:
image.png

Select ”Custom DNS” in the image above, then fill in the CF authoritative DNS server address given on the last page of the CF configuration in the previous section in the box below, and finally click Submit in the red box below.

Note: It will take effect within 24-48 hours after submission. Once it takes effect, the prompt in the red box below example1212.com in the websites section of Cloudflare

image.png

will change to ”Active”, as follows:

image.png

Configure CF to proxy the domestic cloud host

Click ”Add Record” from “Websites” - “example1212.com” - “DNS” - ”Records”, as shown below:

image.png

Fill in the Name (e.g., blog), the IPv4 public address of the domestic cloud host (e.g., 43.44.45.46), and enable the proxy status as shown in the red box below, and finally click Save below:
image.png

This enables access to the host domain name blog.example1212.com and points the origin host to port 443 of the cloud host corresponding to the public IP 43.44.45.46. Note: By default, Cloudflare's free version does not enable CDN; it needs to be configured through page rules, which I will write a separate article about when I have the chance.

Cloud host configuration

In this example, the cloud host needs to add the blog.example1212.com site through web server software (Nginx/Apache installed via aaPanel/bt.cn, or standalone Nginx and Apache, depending on your preference). Here, it is further divided into several situations:
If the site was originally built on the cloud host and the domain name was originally this one, then no action is required; it is already completed.
If the site was originally built on the cloud host, but the domain name is not this one (such as using a brand new domain name as mentioned at the beginning of this article), you need to create a site for this brand new domain name, which is blog.example1212.com in this article, and then configure a reverse proxy to point to the correct origin address (either the local address or domain name is fine).
If the site is not on the cloud host (for example, my origin site is in a home data center and published through Tencent Cloud CDN), and the domain name is not this one, then you need to configure a reverse proxy in the same way as in step 2 (in this case, the reverse proxy can point to the CDN domain name, or to the home data center origin domain name and port).

Finally, a friendly reminder to reasonably configure the SSL/TLS type and choose the method that suits you:

image.png

Because I used Let's Encrypt to automatically apply for and renew certificates for the site corresponding to the domain name for overseas access (blog.example1212.com in this article) on the cloud host, which means there is a valid SSL certificate, I chose ”Full”. You need to choose the appropriate method based on your actual situation, otherwise, access will report an error.

📌 Content Structure Prompt:
This content belongs to the "Cloudflare Learning Map" part, you can view the complete content path from here: Cloudflare Learning Map 。
View Related Categories · 3 Matches
📎 Related Articles
Share this article
The blog content is original, please indicate the source when reposting! The RSS address of the blog is:https://blog.tangwudi.com/feed, welcome to subscribe; if needed, you can join theTelegram Groupto discuss questions together.
No Comments

Send Comment Edit Comment


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗ
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
Kaomoji
Emoji
Little Dinosaur
Flower!
Previous
Next
       

👋 Welcome to “Wudi's Personal Blog”

Here, long-term exploration is mainly carried out around the following directions:

🧱 Personal Digital Infrastructure and Blog System Construction
☁️ Cloudflare and Network Architecture Practice
🧠 AI and Knowledge System Exploration
🛡️ Network Security and Access Optimization
🎵 Music and Sound Cognition
👁️ Cognitive Perspectives and Worldviews