Root Files
You can host files in the root of your domain using Cloudflare R2. This is useful for hosting files like robots.txt
, sitemap.xml
, etc.
The Root Folder
When you clone the reverse-proxy repo, you will see a folder named root
. This folder contains all the files that you want to host in the root of your domain.
Hosting file in root
1. Add file to the root folder
Create or move files to the root
folder.
2. Upload files to Cloudflare R2
Run the following command to upload files to Cloudflare R2.
npx thind@latest proxy --upload
This command will ask you to select the files you want to upload from the root
folder. After selecting the files, the CLI will upload them to Cloudflare R2. After a successful upload, you will see a link to the file in the root of your domain.
tip
You can access files from the root using the following URL format: https://[yourdomain.com]/[filename]