In the world of digital advertising, transparency and control over ad inventory are crucial. The ads.txt file, an initiative by the IAB Tech Lab, helps ensure that your digital ad inventory is only sold through authorized sellers. Here’s a detailed guide on how to create and upload an ads.txt file to your WordPress site using cPanel, Elementor, and the Astra theme.

Step-by-Step Guide

Create the ads.txt File:

Open a Plain Text Editor:

    • Use Notepad (Windows) or TextEdit (Mac).

Paste Your Publisher ID:

    • Paste the following line into the text editor, replacing pub-0000000000000000 with your own publisher ID from your AdSense account:
      google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

Save the File:

  • Save the file as ads.txt.

Log in to cPanel:

  1. Access cPanel:

    • Navigate to yourdomain.com/cpanel.
  2. Enter Credentials:

    • Log in with your cPanel username and password.

Upload the ads.txt File to Your Root Directory:

  1. Open File Manager:

    • In cPanel, go to the File Manager.
  2. Navigate to Root Directory:

    • Locate your website’s root directory, typically named public_html or your domain name.
  3. Upload the File:

    • Click on the Upload button at the top.
    • Select the ads.txt file you created and upload it to the root directory.

Verify the Upload:

  1. Check in Browser:
    • Verify the upload by navigating to https://yourdomain.com/ads.txt in your web browser.
    • If the file displays correctly, the upload was successful.

Confirm with AdSense:

  1. Log in to AdSense:

    • Sign in to your AdSense account.
  2. Address Alerts:

    • If there’s an alert about ads.txt, click on it and follow the instructions to notify AdSense that the file has been uploaded.
  3. Manual Check:

    • Manually check for updates in AdSense by navigating to Sites, selecting your site, and clicking Check for updates.

Tips for Security and Network Maintenance:

  • Keep Backups:

    • Always keep a backup of your website and any important files before making changes.
  • Use Secure FTP:

    • If you are not comfortable using cPanel, consider using a secure FTP client like FileZilla to upload the ads.txt file securely.
  • Regular Updates:

    • Ensure your WordPress installation, themes, and plugins are always up to date to avoid security vulnerabilities.
  • Monitor Your Site:

    • Regularly monitor your site’s performance and security using plugins like Wordfence or Sucuri.

Tips for Security and Network Maintenance:

  • Keep Backups:

    • Always keep a backup of your website and any important files before making changes.
  • Use Secure FTP:

    • If you are not comfortable using cPanel, consider using a secure FTP client like FileZilla to upload the ads.txt file securely.
  • Regular Updates:

    • Ensure your WordPress installation, themes, and plugins are always up to date to avoid security vulnerabilities.
  • Monitor Your Site:

    • Regularly monitor your site’s performance and security using plugins like Wordfence or Sucuri.

By following these steps, you can successfully add an ads.txt file to your WordPress site, helping protect your ad inventory and maximize your revenue potential.

Shopping Cart