Streaming live at 10am (PST)

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…

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: https://cl.ly/3fd715954367

Here is an article on creating a cdn using cdn storage:https://css-tricks.com/adding-a-cdn-to-your-website/

Here is an article using 301 redirects: https://university.webflow.com/article/intro-to-301-redirects

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

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!

1 Like

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

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.