Adding ads.txt file to my website with Starter plan. Please help

laughs Sorry, failed to attach the link! This one:

Yes, it’s working but unfortunately, it’s a little bit too long to modify all articles one by one… :sleepy:

The question about auto ads might be a good question to ask in an adsense forum, @Nathanael . Although some of my reading says that auto ads can take several days to show up after approval. You might want to check that you have all appropriate ad types turned on, and you might want to increase the number of ads shown (there’s apparently a slider?)

My limited reading says that auto ads are basically a ‘black box’ and the method of deciding where to put ads isn’t publicized by Google.

It might be useful to take a look at a preview - does the preview show that ads could appear in the post body, but they just aren’t currently, or does it not identify those parts of the page as a valid target? Documentation: Preview Auto ads settings on your site - Google AdSense Help

1 Like

Yes, it’s exactly what you say : the preview show that ads could appear in the post body, but they don’t appear in the real post.

I’ve read the full guide you provided and it seems that every setting is fine… :expressionless:

So it doesn’t sound like there’s anything to adjust on the ghost side…

1 Like

Just to confirm this process so I know I’m getting it right, is this correct? I’m not seeing my ads.txt being redirected, so I feel like I did something wrong.

I’ve created a GitHub repo that contains my ads.txt, then I published it to the web by using GitHub pages.

Under the Labs section in Ghost, I clicked to download my current redirect file aka redirects.json This was a blank json file with no code.

I added this line of code in Visual Studio and saved it as a redirects.yaml.
/ads.txt: https://chillbilldill.github.io/chillbilldill/ads.txt

Lastly, I clicked “upload redirects file” in Ghost admin labs area and uploaded my new redirects.yaml

1 Like

You need a 301: and please recheck spacing. Its picky!

2 Likes

Got it, thanks! It’s working.

301: 
  /ads.txt: https://chillbilldill.github.io/chillbilldill/ads.txt
3 Likes

I’m trying to do the same thing but it’s been years since I played with code. Do I put the redirect (similar to yours) between the in the json file?

Rick, I recommend the yaml (not json) format like what @chillbilldill.com is showing above. It’s an easier format to read and get right. :)

1 Like

I’ll do that - thank you!

1 Like

It worked for me.
Thank you very much.

Hi, if anyone could use a competent tutorial, here’s how I did it: https://www.techbrain.cz/ghost-starter-jak-na-web-dostat-google-adsence/

Hi @sobotosso, I didn’t want to interrupt you, but for those people who prefer English version I have it in my blog: How to add ads.txt file in Ghost blog.

As I see the steps are the same

1 Like

Thanks to all the contributors here, I also got this to work quite simply in the end. I used GitHub pages to host the ads.txt file.

Has worked like a charm.

Now to see the millions of $$$ pour in :rofl:

3 Likes

Can someone please explain in plain simple English what I need to put in this snippet to get it to work? Like if I place the ads.txt file on one domain and want to link it to my ghost pro domain. Very little in the explanations above or in the suggested blog post make sense to me :grimacing:

Did you try the tutorial from vlarynovich, above? If you’re stuck somewhere, please say where. :slight_smile:

I understand absolute zero and nada of that and any other explanations in how to do it.

I have an ads.txt file available on another location. But how to connect that location such as what to put into, and in which format to the redirect file in Ghost is completely unknown to me. I am literally clueless reading these tutorials :frowning:

OMG, I had the EXACT same problem with the Ghost Starter plan and it drove me crazy for hours. Here’s how I finally fixed it.

First up, a super important thing: check if you gave AdSense your site with “www” or without it. I gave them mysite.com, but my Ghost blog automatically sends everyone to www.mysite.com. So, Google was looking for my ads.txt file at the wrong address the whole time. What a mess.

Here’s what I tried:

Method 1: The redirects.yaml file (This didn’t work for me)

I saw some people saying you can put your ads.txt file on GitHub. Then you make this redirects.yaml file and upload it in the Ghost settings (under Settings → Labs). It’s supposed to tell Ghost to send people from yoursite.com/ads.txt to your GitHub file.

It just gave me errors, but who knows, maybe it’ll work for you.

Method 2: Using Cloudflare (This totally worked!)

  1. First, make sure in your Cloudflare DNS settings, your site has the little orange cloud (proxied) turned on.
  2. Go to Page Rules in Cloudflare.
  3. Create a new rule. For the URL, put *yourdomain.com/ads.txt. The little star * at the front is a magic trick that makes it work for both www and non-www versions of your site.
  4. For the setting, choose “Forwarding URL” and “301”.
  5. For the destination URL, paste the link to your ads.txt file from GitHub.

BIG TIP: Make sure it’s the “raw” link. It should start with raw.githubusercontent.com. I first used a different GitHub link and it made my site go into a crazy refresh loop.

Seriously, it took me hours to figure all this out. The Ghost Starter plan doesn’t make this easy. But the Cloudflare way definitely works. Just make sure you use that raw file link!

Good luck! I hope this helps you out.

1 Like