Not Selected#
Selected#
Conclusion: As can be seen, the response speed of the selected websites has greatly improved, and the number of outbound IPs has also increased. This can significantly enhance the usability of your website and speed up loading times.
Selected Node Usage: cloudflare.182682.xyz
For A, AAAA, CNAME#
We need two domain names (for example: onani.cn and acofork.cn)
Here we make onani.cn the primary domain and acofork.cn the auxiliary domain.
- First, create a DNS resolution pointing to your origin server, enable cf proxy.
- Go to SSL/TLS -> Custom Hostnames. Set the fallback origin to the domain of your previous DNS resolution (xlog.acofork.cn), add the custom hostname to the domain you ultimately want users to access (onani.cn), and follow the instructions to add TXT ownership verification and TXT certificate verification to the primary domain (onani.cn) until the certificate status and hostname status both become valid.
- Continue to add a resolution to your auxiliary domain. CNAME to the selected node: cloudflare.182682.xyz, do not enable cf proxy.
- Finally, add a resolution to your primary domain. The domain is the custom hostname from the auxiliary domain (onani.cn), and the target is the previous cdn.acofork.cn, do not enable cf proxy.
-
Selection completed, try to access.
-
(Optional) You can also change the NS servers of the cdn subdomain to Alibaba Cloud\Huawei Cloud\Tencent Cloud DNS for traffic diversion.
Selection workflow: User access -> Since the final access domain has set up CNAME resolution, it actually accesses cdn.acofork.cn, carrying source hostname: onani.cn -> Arrives at cloudflare.182682.xyz for selection -> Selection ends, cf edge node recognizes the carried source hostname: onani.cn query and finds the fallback source -> Fallback to the fallback source content (xlog.acofork.cn) -> Access successful.
For Cloudflare Page#
- You can directly change the NS servers of the subdomain bound to Page to Alibaba Cloud\Huawei Cloud\Tencent Cloud DNS for traffic diversion.
For Cloudflare Workers#
- In Workers, add a route, then directly change your route domain from pointing to
xxx.worker.dev
tocloudflare.182682.xyz
or other selected domains.
Troubleshooting#
-
Q: What if my origin server uses Cloudflare Tunnels?
A: You need to add two rules in Tunnels, one pointing to your auxiliary domain and one pointing to the final access domain. Then delete the DNS resolution for the final access domain (but do not delete it directly in Tunnels, as it will drop from the whitelist, causing users to access 404). Then skip the first step.Principle: Assume you have completed the configuration, but Cloudflare Tunnels only has one rule set.
Classification discussion, if the rule you set only points to the auxiliary domain, then in the selection workflow: User access -> Since the final access domain has set up CNAME resolution, it actually accesses cdn.acofork.cn, carrying source hostname: onani.cn -> Arrives at cloudflare.182682.xyz for selection -> Selection ends, cf edge node recognizes the carried source hostname: onani.cn query and finds the fallback source -> Fallback source detects that source hostname: onani.cn is not in the whitelist -> Reports 404 Not Found. Access failed.
Classification discussion, if the rule you set only points to the final access domain, then in the selection workflow: User access -> Since the final access domain has set up CNAME resolution, it actually accesses cdn.acofork.cn -> Since cdn.acofork.cn is not in the Tunnels whitelist, access fails.
-
Q: What if my origin server uses Cloudflare Origin Rule (port fallback)?
A: You need to change the effective hostname of the rule to the final access domain; otherwise, the fallback strategy will not be triggered (which will cause the auxiliary domain to be inaccessible, it is recommended to use Cloudflare Tunnels).Principle: Assume you have completed the configuration, but the effective hostname of the Cloudflare Origin Rule (port fallback) rule is the auxiliary domain.
Then in the selection workflow: User access -> Since the final access domain has set up CNAME resolution, it actually accesses cdn.acofork.cn, carrying source hostname: onani.cn -> Arrives at cloudflare.182682.xyz for selection -> Selection ends, cf edge node recognizes the carried source hostname: onani.cn query and finds the fallback source -> Fallback to the fallback source content (xlog.acofork.cn) -> But since source hostname: onani.cn is not in the Cloudflare Origin Rule (port fallback) rules -> Cannot trigger the fallback strategy, access fails. -
Q: What if my origin server uses serv00?
A: You need to add two rules in the WWW Web Site interface, one pointing to your auxiliary domain and one pointing to the final access domain.Principle: Assume you have completed the configuration, but serv00 only configured one of the domains.
Then in the selection workflow: It will lead to access errors, as serv00 will intercept requests for domains not in the whitelist.