[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eApp-ads.txt is an IAB initiative that helps app developers combat ad fraud and ensure ad revenue is directed appropriately by authorizing ad inventory sellers.\u003c/p\u003e\n"],["\u003cp\u003eApp developers create and publish an app-ads.txt file containing a list of authorized sellers to their developer website, making it publicly accessible for verification.\u003c/p\u003e\n"],["\u003cp\u003eFirebase Hosting offers a straightforward way to host your app-ads.txt file if your current website setup doesn't allow it, especially for those using site-generation services.\u003c/p\u003e\n"],["\u003cp\u003eAdMob requires at least 24 hours to crawl and verify the app-ads.txt file after it's published, so developers need to allow for this processing time.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can monitor their app-ads.txt status and refer to resources provided by AdMob for troubleshooting or further information regarding implementation.\u003c/p\u003e\n"]]],[],null,["# Authorized Sellers for Apps (app-ads.txt)\n\nSelect platform: [Android](/admob/android/app-ads \"View this page for the Android platform docs.\") [iOS](/admob/ios/app-ads \"View this page for the iOS platform docs.\")\n\n\u003cbr /\u003e\n\nAuthorized Sellers for Apps, also known as\n[app-ads.txt](//iabtechlab.com/wp-content/uploads/2019/03/app-ads.txt-v1.0-final-.pdf),\nis an IAB initiative that helps protect your app ad inventory from ad fraud. You\ncreate app-ads.txt files to identify who is authorized to sell your inventory.\nIdentifying authorized sellers can help you receive advertiser spend that might\nhave otherwise gone toward counterfeit inventory of spoofed apps.\n\nThe app-ads.txt files are publicly available and crawlable by exchanges,\nsupply-side platforms (SSP), other buyers, and third-party vendors.\n\nUse of app-ads.txt is not mandatory, but is highly recommended, especially if\nyou are concerned that others may be spoofing your app.\n\nAn app-ads.txt file is a text file that an app developer posts in the root\ndomain of their app's developer website. It contains a list of entities\nauthorized to sell that publisher's inventory. The usage of the app-ads.txt file\nrequires that publishers have a web domain to publish their authorized sellers\nlist for different ad tech vendors to crawl. There are a number of domain\nhosting solutions that allow for the arbitrary hosting of files including\n[Firebase](https://firebase.google.com/docs/hosting).\n\nPrerequisites\n-------------\n\n- Read [Set up an app-ads.txt file for your\n app](//support.google.com/admob/answer/9363762).\n- Browse through [Manage your Firebase\n projects](//firebase.google.com/docs/projects/learn-more).\n\nHow to set up app-ads.txt for your apps\n---------------------------------------\n\n1. If you haven't already, create a text file and save it with the name\n \"app-ads.txt\".\n\n2. Copy and paste the following code snippet into your app-ads.txt file.\n (Replace `pub-00000000000000` with your publisher ID. Your publisher ID can\n be found at **AdMob console \\\u003e Settings**.)\n\n google.com, pub-00000000000000, DIRECT, f08c47fec0942fa0\n\n3. Publish your app-ads.txt at the root of your developer website (for example,\n `https://example.com/app-ads.txt`). Make sure the domain is entered exactly\n as listed on Google Play.\n\n | **Note:** If your website does not allow you to publish app-ads.txt on the root level, you can use [Firebase Hosting](#firebase) as one of the options for hosting your app-ads.txt file.\n4. Wait at least 24 hours for AdMob to crawl and verify your app-ads.txt file.\n\n5. Come back to AdMob and check your [app-ads.txt\n status](//support.google.com/admob/answer/9788846).\n\nPublish app-ads.txt with Firebase Hosting\n-----------------------------------------\n\nIf you have a website that disallows the uploading of your app-ads.txt file at\nthe root level (e.g., a site built and hosted by a site-generation service), you\ncan use Firebase Hosting to host your app-ads.txt file.\n\nFirebase offers a free, fast, and reliable way to host your app-ads.txt file\nwith your own [custom\ndomain](//firebase.google.com/docs/hosting/custom-domain) or on Firebase\nproject's free subdomains: `web.app` and `firebaseapp.com`.\n\n### Before you begin\n\nYou'll need to have a Firebase project to publish app-ads.txt with Firebase\nHosting. If you don't have a Firebase project, create a new one by following the\n[developer guide](//firebase.google.com/docs/projects/learn-more).\n\nIf you've already [linked your AdMob apps to\nFirebase](//support.google.com/admob/answer/6383165) or your app is using one of\nthe Firebase products (e.g., Google Analytics for Firebase, Remote Config,\netc.), you can use the existing Firebase project.\n\n### Install the Firebase CLI\n\nYou can install the Firebase CLI by using [npm](//www.npmjs.com/) (Node Package\nManager). However, if you're not familiar with Node.js, you can use the\nstandalone binary instead.\n\nVisit the Firebase CLI documentation to learn how to [install the\nCLI](//firebase.google.com/docs/cli#install_the_firebase_cli) or [update to its\nlatest version](//firebase.google.com/docs/cli#update-cli).\n\n### Initialize your project\n\nTo initialize your Firebase project in your local machine, run the following\ncommand from the root of your project directory. \n\n```\nfirebase init\n```\n| **Key Point:** Make sure you're signed in with the account which has the Editor/Owner role of the project you're initializing.\n\nDuring project initialization, from the Firebase CLI prompts:\n\n1. Select to set up **Hosting**.\n\n2. Select a Firebase project to connect to your local project directory.\n\n Select **Use an existing project**, then choose a project from the list\n that you want to connect.\n3. Specify a directory to use as your public root directory.\n\n Press enter to select a default one (public).\n4. Choose a configuration for your site.\n\n Since the website you're going to create is not a single-page app, select\n **N**.\n\nAt the end of initialization, Firebase creates and adds two files to the root of\nyour local project directory:\n\n- A `public` directory that contains files hosted on your website.\n- A `firebase.json` configuration file that lists your project configuration.\n- A `.firebaserc` file that stores your project alias.\n\n### Publish app-ads.txt\n\nTo publish app-ads.txt to your site:\n\n1. Put the app-ads.txt file into the `public` directory in your local project\n directory.\n\n2. Run the following command from the root of your local project directory:\n\n ```\n firebase deploy --only hosting\n ```\n3. Once deployment is complete, visit the following URL to make sure\n app-ads.txt is published. (`PROJECT_ID` is your Firebase project ID.)\n\n `https://PROJECT_ID.web.app/app-ads.txt`\n\n Example: If \"awesome-project\" is the project ID, enter\n `https://awesome-project.web.app/app-ads.txt` in the address bar of your\n browser.\n\n### Add domain/subdomain to your app's store listing\n\nIn order for your app-ads.txt file to be crawled, you will need to list the\nnewly created domain or subdomain in your app listing on\nGoogle Play.\n\n\nUpdate the\ndeveloper website in the app store listing as follows:\n\n`https://PROJECT_ID.web.app`\n| **Key Point:** It can take up to 24 hours for AdMob to crawl and verify your app-ads.txt files. Please wait at least 24 hours for the app-ads.txt status to update.\n\n### Configure redirection settings (optional)\n\nIf you have an existing website and plan to use Firebase Hosting just for\nhosting your app-ads.txt file, you can configure Firebase Hosting to redirect\nthe landing page to your existing website.\n\nFirebase Hosting will use `public/index.html` as a landing page by default when\na user visits your site. To redirect users to the website that you want (for\nexample, your app's social media page):\n\n1. Open `firebase.json` file located in the root of your local project\n directory.\n\n2. Under hosting object, add redirects object as follows:\n\n \"hosting\": {\n ...\n \"redirects\": [\n {\n \"source\": \"/\",\n \"destination\": \"URL_TO_REDIRECT\",\n \"type\": 301\n }\n ]\n }\n\n For example, if the landing page URL is `https://www.example.com`, the\n redirect configuration will be as follows: \n\n \"hosting\": {\n ...\n \"redirects\": [\n {\n \"source\": \"/\",\n \"destination\": \"https://www.example.com\",\n \"type\": 301\n }\n ]\n }\n\n3. Run the following command to deploy the changes to your site.\n\n ```\n firebase deploy --only hosting\n ```\n4. Once the deployment is complete, access your site\n (`https://PROJECT_ID.web.app`) to check whether the redirection setting is\n correct or not.\n\nResources\n---------\n\n- [Ensure your app-ads.txt files can be crawled](//support.google.com/admob/answer/9679128)\n- [Learn more about app-ads.txt file statuses](//support.google.com/admob/answer/9363762)\n- [App-ads.txt FAQ](//support.google.com/admob/answer/9675354)"]]