Google Adsense ads.txt file - how to set up?

Google AdSense is currently giving me this error:

and according to this link I need to add ads.txt to my site.

However, Webflow apparently doesn’t support this which I find incredible given how important ads are to sustaining sites.

I’ve been told to use a “meta tag method” to put info in the Head of my site using custom code. Can anyone walk me through how to do this please? I am not a web dev, so please be gentle…

1 Like

You would need to host the ads.txt file on another host, then create a redirect in webflow to point to the new location, which could be a subdomain or a new domain.

Thanks for the reply - I’ve uploaded the file onto another site I own and confirmed it works (ads.robkershaw.com/ads.txt)

I then created a 301 redirect as follows:

Is this correct? Because Google AdSense is still saying that the Webflow site doesn’t have an ads.txt file. Does it take a while for Google to check and update it?

What is the webflow site URL?

Apologies - I normally include that!

The redirect works, but Google may have an issue because you are redirecting from https:// to http://

Hi,

No - the warning at Google has gone so it looks like it’s now working. Many thanks!

Can someone break this down in simple terms? I have my publisher ID I have entered in all of my info in the format Google is specifying with my publisher ID that I have saved as ads.txt. and now I have to add this to my site. Is it as simple as creating a page on my site that is domain/ads.txt and uploading the file link on the page? The user above talks about hosting it on another site but I don’t know how to ‘host’ this file on any site…which format do I use to upload the file to a page/any page to make this work?

Hi Kevin,

Webflow doesn’t easily support this without using “something” external unfortunately.

I had another domain (with a different host, outside of webflow) which I just uploaded the ads.txt file to via an FTP client, and then referenced it in Webflow’s 301 redirects section of the settings page. If you own another domain, I think this is by far the easiest way of doing it. If you don’t own a second domain, perhaps one of your friends does? If they aren’t using that domain for Google ads, they could host the file for you at the root of their site and then you’d just add a 301 redirect into Webflow of:

/ads.txt → https://www.myfriendsdomain.com/ads.txt

Alternatively, here’s the walkthrough I got from their support team. It will require you to purchase CDN storage; Amazon has an offer for 12 months free. But to be honest, given you can get a domain from a webhost like GoDaddy for 0.99 pence/cents a year and the fact that it is SO MUCH SIMPLER to just upload the file and then point Webflow at it, I’d recommend doing that instead:

==============

We do not yet have the ability to host a file on the root of the domain, only the domain redirect option is going to work. To do this will require some external cdn storage where you can map a subdomain like cdn.example.com at the external storage, then upload the ads.txt file to that storage.

After external storage is setup a 301 redirect can be setup to redirect the example.com/ads.txt file that google is expecting to cdn.example.com/ads.txt

I made a video to help explain these options: Screen Recording 2019-05-31...

Here is an article on creating a cdn using cdn storage:Adding and Leveraging a CDN on Your Website | CSS-Tricks - CSS-Tricks

Here is an article using 301 redirects: 301 redirects | Webflow University

=============

The fact that Webflow doesn’t allow basic file hosting with direct (rather than relative) file paths seems staggering to me, but there are a lot of features that the CMS is missing in general. Hope this is of use!

2 Likes

I received the video for this and appreciate it but you focused on hosting this through a CDN… Can you show how to do this using another webflow site, we have multiple available to use.

I’ve created a page on another webflow site rootdomain at www.bloxnews.net/ads.txt and uploaded the file 2 ways, one with the file link text and another with the link. I’ve forwarded oflaherty-law.com/ads.txt to the blox link. What are we doing wrong? BTW we are setting up ads for oflaherty-law.com

Anyone know if it is still not possible to upload this ads.txt to webflow? I’m hitting the same issue and would love to avoid the workaround and keep this all in one place if possible.
Thanks!
Jen

1 Like

Best way to test is to try, but I will save you a step. Still not possible.

ha! Thanks! I did and I looked around for about half an hour in my project settings and in my other projects that are on the more expensive plans and I didn’t see anything. Thanks for your answer.

1 Like

I just tried to create a new page with the ads.txt suffix and it did not work. I opened a blank page, added the HTML custom code widget, entered the code, then password protected the page. I tried to use the slug ‘ads.txt’ but Webflow kept changing it to ‘ads-txt’. Just thought I’d add my strategy to the list of things that didn’t work.

Just in case anyone is still struggling with this problem…

this worked for me: LMS | Redirect to ads.txt

2 Likes