• Resolved harunah

    (@harunah)


    Hello,

    I have a main website, as well as an add-on site that has a separate WordPress installation.

    I was able to successfully install Google Adsense to my main domain, however, with my subdirectory that is separately installed it keeps saying “The ads.txt file cannot be placed because the URL contains a subdirectory. You need to make the file available at (my main domain url)”.

    I did 2 things to try to fix this problem:
    1. I added the code “subdomain=theharunafamily.com/home” to the ads.txt file.
    2. I opened up FTP and added the ads.txt file into the root directory (the public_html folder).

    I have no idea whether these steps were helpful or not, but I am still getting the error message.

    I would really appreciate any ideas on how to fix this!! (:
    Thank you so much,
    – Hannah

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Thomas Maier

    (@webzunft)

    Hi Hannah,

    thanks for reaching out.

    My apologies for the irritating message. It does not check automatically if your ads.txt exists already on the main site. You can ignore the warning since your ads.txt file looks fine.

    Bots that check the ads.txt file don’t know that the page in a subdirectory does technically not belong to the main domain, so having just the file on the main domain is fine.

    The subdomain entry is for subdomains, e.g., home.theharunafamily.com and not subdirectories.

    Please let me know if you need anything else.

    Best regards,
    Thomas

Viewing 1 replies (of 1 total)

The topic ‘Problem with Google Adsense working on subdirectory’ is closed to new replies.