Ads.txt Not Working

I attempted the below text, but I have no clue how to access the Backend folder on my Wix Blog :(. Any tips on coding for this Art History grad?

Hi,
Just wanted to contribute to this thread and say thanks for pointing us in the right direction - - to help others who may potentially come across this stumbling block - here is what you need to do. Create a file called http-functions.js in your Backend folder of files.
Then copy this template and add your own text:
import {ok, notFound, serverError} from ‘wix-http-functions’;
// @see https://www.wix.com/corvid/forum/community-discussion/adding-ads-txt-file
let adstxt = # Ads.txt Add text here...
export function get_Adstxt(request) {
let options = {
“headers”: {
“Content-Type”: “text/plain”
},
“body”: adstxt
};
return ok(options);
}
You will then be able to access it on your site at eg. http://yourwebsite.com/_functions/Adstxt
For the final step (you must do this) - in your settings - add a Redirect for /ads.txt to point to /_functions/Adstxt
Then ad networks will find your file correctly - job done.

You will find your backend in the site structure on the left hand side of your Wix Editor.
https://support.wix.com/en/article/corvid-working-with-the-site-structure-sidebar

hi…i have done everything, but the redirect is not working. both /ads.txt and /_functions/Adstxt are working individually but redirecting doesnt work…Please help

1 Like

Hi , Is your issue resolved now or not ? If yes can you please advise.

hi…i have done everything, but the redirect is not working. both /ads.txt and /_functions/Adstxt are working individually but redirecting doesnt work…Please help

1 Like

i did everythings everything but nothing works at all on wix can someone help , i created a new file and its was empty and i tried to put all these by typing becouse it cant also copy paste. so whats going on

Hello everyone,

I need also to redirect to an ads.txt file which isn’t provide by google.
I have followed all the steps but I still have access the bot pages /ads.txt to point to /_functions/Adstxt
the redirection is not working.

Can someone have a look ?