How to Enable Ads.txt on Ghost Starter

Introduction
The ads.txt file is designed to be placed directly at the root of your site. On Ghost Starter, however, you don’t have access to the site root, making it impossible to deploy ads.txt by default.
If ads.txt is missing, not only can you lose control over which ads appear on your site (potentially allowing low-quality or even malicious ads to slip through), but you also risk undermining your monetization efforts entirely. For many site operators, if you can’t manage ads.txt, it may be better to avoid running ads altogether.
To make matters worse, practical solutions are rarely shared publicly—even in June 2025, global Ghost users are struggling to resolve this issue. I was in the same situation.
Here, you’ll find the simplest working method to enable ads.txt on Ghost Starter.
Step 1: Register with Cloudflare
Create an account on Cloudflare.
The free plan is sufficient.
Step 2: Create a Classic Worker
- Go to the Workers & Pages section
- Select “Create Application” and choose “Classic”

- Click the Create button

- Click “Deploy” to launch the default “Hello World” Worker

Step 3: Edit and rewrite Hello World
- First, switch to the code editing screen
Click on Hello World created in Workers & Pages and look for the top right
Step 4: Edit Your Worker Code
- Open the deployed Worker. Switch to code edit screen

Replace the default code with the following, inserting your actual ads.txt content as shown:
export default {
async fetch(request, env, ctx) {
if (new URL(request.url).pathname === "/ads.txt") {
return new Response("Enter the code provided by Ads.txt here", {
headers: { "content-type": "text/plain; charset=utf-8" }
});
}
return fetch(request);
}
};
- Click Deploy when done
Step 5: Set the Worker Route
- Go to the Worker Routes section

- Click “Add route”

- Set the route as
yourdomain.com/ads.txt
and assign it to your new Worker - Save
Step 6: Verify
Open your browser and visit yourdomain.com/ads.txt
.
If your custom ads.txt content appears, it’s working. Congratulations!
📺 HFW AI Channel – Watch full video reviews here
Not just a YouTube channel — a channel where tools are tested and compared with extensive knowledge and practice, pushing the limits of AI.