Google are encouraging advertisers to host an ads.txt file at the root level of their domain. e.g. example.com/ads.txt. (https://support.google.com/dfp_premium/answer/7441288?hl=en)
How can this be done with Shopify?
Uploading an assets doesn't work because the file is hosted at a Shopify CDN URL, e.g. https://cdn.shopify.com/...
Uploading to the Files section results in the same issue.
Using either of those options and creating a redirect also does not work.
I'm pretty sure there isn't a way for you to explicitly host a file at the root level, but there might be a work around depending on how Google follows the URL redirects.
Basically, you upload your ads.txt file in the Shopify File Upload (which goes into their CDN). Then you create a URL Redirect which can be at the root level (example: yourdomain.com/ads.txt).
Look at the bottom of this documentation page that explains how to do this step-by-step.
Let us know if Google accepts this method and I hope this helps!
Hello, Download your Ads.txt. Go to setting then Files upload your downloaded ads.txt Copy the URL. Then go to your navigation create URL directs. Paste the direct URL to Redirect to and add ads.txt to Redirect from. Thanks, Vince Servidad.
1. First go to settings > files - and upload the file ads.txt
2. then go to online store > navigation and on the top you will see "URL redirection". click on it
3. press Create URL redirection
4. Redirect from /ads.txt
5. Redirect to add the relevant URL. You need to add the relevant URL from settings>files>ads.txt there you will see the URL
Hi, Even I am getting the same error on my Adsense account: Earnings at risk - You need to fix some ads.txt file issues to avoid severe impact to your revenue. My website address is: https://www.chembondindia.in and I am able to successfully get the ads.txt on appending this with ads.txt Kindly help resolve this issue or else advise on who to speak to. Thanks.