How to Enable Ads.txt on Ghost Starter

Ads.txt Image
Ads.txt Image

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”
Workers&Pages
Workers&Pages
  • Click the Create button
Hello World
Hello World
  • Click “Deploy” to launch the default “Hello World” Worker
Deploy “Hello World”
Deploy “Hello World”

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
code editor
code editor

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
Worker Routes
Worker Routes
  • Click “Add route”
Route editing
Route editing
  • 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.

Our Partner Links: | Freebeat.AI (10% OFF anytime) | Luma Ray2 | FlexClip (10% OFF anytyme, also Coupon Code: 'FCFD30' Ends: June 30, 2025) |