Notification

Please make sure that you visit Your AdSense Page, where you can find personalised information about your account to help you succeed with AdSense.

Inventory management

Ads.txt FAQs

Below are answers to some of the most frequently asked questions about ads.txt.

Expand all  Collapse all
How do I set up an ads.txt file for WordPress?

Consider using a plugin to create your ads.txt file in WordPress. If you already use a plugin to place ads, it might include a feature to create your ads.txt file. This search can help you get started.

My CMS doesn't let me place a file on my root domain. What should I do?

Contact your CMS provider who should provide you with the facility to host an ads.txt file on your behalf.

What if the ads.txt file is hosted on a subdomain?

Google crawls and enforces ads.txt files placed on subdomains, where one exists, and is referenced from the ads.txt file on the root domain.

To reference a subdomain in your root domain ads.txt file, you add a subdomain= declaration. For example, let's say that your ads.txt file for example.com needs to reference the subdomain subdomain.example.com. You'd add this line to your root domain ads.txt file: subdomain=subdomain.example.com. See the IAB ads.txt specification for additional details on subdomain referral.

Note: You only need to do this if the authorised seller or your publisher ID are different for the subdomain when compared to the root domain.
Does Google support redirects?

Google supports a single HTTP redirect to a destination outside the original root domain (for example, example1.com/ads.txt re-directs to example2.com/ads.txt). See the IAB update.

Multiple redirects are also supported, as long as each redirect location remains within the original root domain. For example:

  • example.com/ads.txt redirecting to www.example.com/ads.txt
  • example.com/ads.txt redirecting to subdomain.example.com/ads.txt
  • example.com/ads.txt redirecting to example.com/page/ads.txt
How does Google enforce ads.txt files?

Google uses the content of any ads.txt files hosted on a root domain to determine which seller accounts are allowed to serve ads on that domain. Google runs an auction and returns a winning ad for requests on sites where an ads.txt file exists with a correctly listed publisher identifier. If the identifier in the file is incorrect, an auction isn't run for that request.

What information goes in an ads.txt file?

Include a separate line in the file for each authorised seller. Each line in a publisher’s ads.txt list requires three pieces of data (plus a fourth optional field):

<Field #1>, <Field #2>, <Field #3>, <Field #4>

  • <Field #1>: The domain name of the advertising system (required).

    The canonical domain name of the SSP, exchange, header wrapper, etc. system that bidders connect to. This may be the operational domain of the system, if that is different than the parent corporate domain, to facilitate WHOIS and reverse IP lookups to establish clear ownership of the delegate system. Ideally the SSP or exchange publishes a document detailing what domain name to use. 

    For Google seller accounts, the domain name is always google.com.

  • <Field #2>: The publisher’s account ID (required).

    The identifier associated with the seller or reseller account within the advertising system in field #1. This must contain the same value used in transactions (such as OpenRTB bid requests) in the field specified by the SSP/exchange. Typically, in OpenRTB this is the publisher.id field. For OpenDirect, it is typically the publisher’s organization ID. 

    For Google seller accounts, use the publisher ID displayed in each account (for example, pub-0000000000000000). To find this ID:

    Only include the pub- prefix and the 16-digit numeric code in your declaration. Delete the product-specific prefix (for example, ca- or ca-video-). If you monetise through multiple Ad Manager and/or AdSense accounts, you must include a separate row for each account, with its corresponding pub- code.
    Domains where an ads.txt file is posted, but the seller’s publisher ID is not authorized in the file, are no longer monetised through Ad Manager, and Google no longer buys ads on such sites. To prevent impact to your earnings, we recommend that you update your ads txt files to include publisher IDs for each site that you want to monetise (learn how to update ads.txt in Ad Manager). If you use Scaled Partner Management, we recommend working with your scaled partners to include your publisher ID in their ads.txt files.
  • <Field #3>: Type of account/relationship (required).

    An enumeration of the type of account.

    • A value of 'DIRECT' indicates that the publisher (content owner) directly controls the account indicated in field #2 on the system in field #1. This tends to mean a direct business contract between the publisher and the advertising system.

      Google publishers who directly control the account indicated in field #2 should specify 'DIRECT'.

    • A value of 'RESELLER' indicates that the publisher has authorised another entity to control the account indicated in field #2 and resell their ad space via the system in field #1. Other types may be added in the future. Note that this field should be treated as case-insensitive when interpreting the data.

      Google publishers who do not directly control the account indicated in field #2 should specify 'RESELLER'. For example, an Ad Manager account using Network Partner Management should specify 'RESELLER' for inventory that the account doesn't manage directly.

  • <Field #4>: Certification authority ID (optional).

    An ID that uniquely identifies the advertising system within a certification authority (this ID maps to the entity listed in field #1). A current certification authority is the Trustworthy Accountability Group (TAG), and the TAG ID would be included here.

    For Google seller accounts, the TAG ID is f08c47fec0942fa0.

Was this helpful?

How can we improve it?
true
Your AdSense page

Introducing AdSense Page: a new resource in which you can find personalised information and new opportunities in your account to help to succeed with AdSense.

Search
Clear search
Close search
Main menu
4838193071208553547
true
Search Help Centre
true
true
true
true
true
157
false
false