ADD ads.txt file in WIX Website for Google adsense

Updated: Aug 24

ADD ads.txt file in WIX Website for Google adsense. wix ads.txt problem solution,wix ads.txt problem solution, ads.txt file, ads.txt file adsense, ads.txt file wix, ads.txt file wix website, ads.txt file wix hindi, ads.txt file problem fix, ads.txt file issues to avoid severe impact on your revenue, ads.txt file adsense wix, ads.txt file adsense how to fix ads.txt in wix, ads.txt file adsense how to fix ads.txt in wix website, ads.txt file problem fix, ads.txt file problem in wix

we have seen that there is problem to wix website owner to place (ads.txt) file in Wix website. Because you can find Blogs and videos for Wordpress and others but not for wix.

So, don't worry and follow these simple steps to add (ads.txt) file in wix website.

1. Login to Your Wix account.



2. Click on Edit Site.

3. Turn ON Dev Mode


4. Go to Backend and Click +

5. Make "New .js File


6. Paste this code

import {ok, notFound, serverError} from 'wix-http-functions';
// @see https://www.wix.com/corvid/forum/community-discussion/adding-ads-txt-filehttps://www.wix.com/corvid/forum/community-discussion/adding-ads-txt-file
let adstxt = `# Ads.txt
google.com, pub-0000000000000000, DIRECT, 0000000000000000`;
export function get_Adstxt(request) {
	let options = {
		"headers": {
			"Content-Type": "text/plain"
		},
		"body": adstxt
	};
	return ok(options);
}

7. Replace pub-0000000000000000 by your own code.

8. Replace DIRECT, 0000000000000000 by your own code.

9. Publish Site.

10. Check YOUR SITE/ads.txt after 12 hours. It should show

google.com, pub-0000000000000000, DIRECT, 0000000000000000`;


Thank You.

396 views