• Resolved annaburgess

    (@annaburgess)


    Hi there, I am trying to setup adsense ads in a staging environment. The live domain has been accepted by Adsense and we have created a test ad unit.

    I have connected the plugin to the adsense account on staging environment ok but getting the following error…

    One of your sites is missing the AdSense publisher ID in the ads.txt file

    I tried to rectify this using the tool mentioned in the manual however it is unable to create the file

    Does the ads.txt need to be created on the live domain rather than the staging environment?

Viewing 3 replies - 1 through 3 (of 3 total)
  • schmidt25

    (@schmidt25)

    Hi annaburgess,

    Thanks for reaching out.

    Advanced Ads imports this notification from your AdSense account. This error must not be related to the website where you can see it in your backend. For example, if you have 3 sites registered at AdSense and one of them has no ads.txt. If you connect your 4th (test) site with AdSense now, you would see the notification, even if your test site already has a correct ads.txt file.

    You can check this by navigating to your AdSense account > Sites > Overview. There, you will see a list of all registered sites without the ads.txt.

    You can verify under yourdomain/ads.txt if an ads.txt file has been created correctly. The file is not mandatory for ads to appear.

    So I wouldn’t get confused if the problem occurs only on the staging site. It must be correctly created and accessible on the live site.

    If your test site is a subdomain of the live site, it is also sufficient if the ads.txt is present on the top-level domain.

    Best regards,
    Joachim

    Thread Starter annaburgess

    (@annaburgess)

    Thank you for getting back to me, thats great thankyou. Our staging site has a shield and I think that was not allowing the ads.text file to be created.

    Issue resolved! 🙂

    schmidt25

    (@schmidt25)

    Hi annaburgess,

    That’s perfect 🙂

    Best regards,
    Joachim

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Ads.txt setup for a staging environment’ is closed to new replies.