In today’s digital age, website owners often rely on advertising to generate revenue. One critical step for ensuring transparency in advertising and maximizing earnings is through the implementation of an ads.txt file. This file, short for “Authorized Digital Sellers,” is a simple yet effective way to list authorized digital advertising companies and their respective domains. While many plugins are available to help automate this process in WordPress, this article will guide you through how to add an ads.txt file manually without using any plugin.
What Is an Ads.txt File?
The ads.txt file is a simple text file that can be placed in the root directory of your website to declare which advertising networks are authorized to sell your ad space. The purpose of this file is to combat ad fraud by ensuring that only legitimate and authorized sellers can monetize your website.
By adding an ads.txt file to your website, you allow advertisers to verify that you are a legitimate publisher and that your advertising inventory is being sold only through authorized channels. This helps maintain the integrity of your website’s ad sales and maximizes your earnings by preventing unauthorized parties from claiming or reselling your ad space.
Why Should You Add an Ads.txt File?
Transparency: By listing only authorized sellers in your ads.txt file, you provide transparency to your advertisers, ensuring they know where their ads are being placed.
Protection from Ad Fraud: Without an ads.txt file, your ad inventory could be misused by unauthorized sellers, potentially leading to revenue loss. It helps reduce the chances of counterfeit ad space being sold.
Increase in Earnings: By clearly identifying authorized sellers, you might be able to forge stronger relationships with these partners, which could lead to better ad deals and higher earnings.
How to Add an Ads.txt File Manually in WordPress
While there are many ways to implement ads.txt in WordPress through plugins, we will focus on how to do this without a plugin, giving you complete control over the process.
1. Create an Ads.txt File
First, you need to create the ads.txt file. You can do this using any text editor. Here’s how:
Open a text editor like Notepad (for Windows) or TextEdit (for Mac).
Add the names of the advertising networks that you work with. Each entry in the ads.txt file consists of the following details:
-
- The advertising network’s domain name
- The account ID (This can typically be found in your account settings on the advertising network’s platform)
- The type of relationship (This indicates if the relationship is direct or if it’s through a reseller)
For example, an entry in the ads.txt file might look something like this:
-
google.com, pub-1234567890123456, DIRECT
-
rubiconproject.com, 12345, RESELLER
-
google.com represents the domain of the Google AdSense network.
-
pub-1234567890123456 is the publisher’s unique Google AdSense account ID.
-
DIRECT means the publisher directly works with Google, whereas RESELLER means the publisher works with a third-party reseller like Rubicon Project.
Once you’ve added the relevant information for all the ad networks you work with, save the file with the name ads.txt
. Ensure that the file is saved as a plain text file and that the encoding is set to UTF-8.
2. Upload the Ads.txt File to Your WordPress Site
After creating your ads.txt file, you need to upload it to the root directory of your WordPress site. The root directory is the main folder that contains the wp-admin, wp-content, and wp-includes folders. Here’s how you can upload the file:
Using cPanel File Manager
Log into your hosting provider’s cPanel (or equivalent hosting dashboard).
Open the File Manager and navigate to the root directory of your website. This is usually the public_html
folder or the folder where your WordPress files are located.
Upload the ads.txt file that you created by clicking the “Upload” button in the file manager interface.
Once uploaded, make sure that the ads.txt file is in the root directory, not in any subfolder.
Using FTP (File Transfer Protocol)
If you prefer using FTP, you can upload the file using an FTP client such as FileZilla.
Download and install FileZilla or another FTP client.
Connect to your website’s server by entering your FTP credentials (host, username, password, port) that your hosting provider should have provided you.
Navigate to the root directory of your website.
Drag and drop the ads.txt file into the root directory from your local computer to the server.
Verify that the file is uploaded correctly by visiting the root directory of your website.
3. Verify the Ads.txt File is Accessible
Once the file is uploaded, you need to verify that it is publicly accessible. To do this:
- Go to your browser and type your website URL followed by /ads.txt.
- For example: https://www.yoursite.com/ads.txt
If the file has been uploaded correctly, you should see its contents displayed in your browser. If you see a 404 error or the file doesn’t appear, double-check that it’s in the root directory.
4. Update the Ads.txt File Regularly
The ads.txt file is not a static file. As you work with different advertising networks and publishers, you may need to update the file by adding or removing entries.
Whenever you add a new advertising network or change any existing relationships, make sure to update the ads.txt file to reflect these changes. Re-upload the file to the same location every time you make an update.
5. Test the Implementation
After you’ve successfully uploaded and updated your ads.txt file, it’s important to test that the file is working correctly. Here’s how you can check:
Check the file in your browser: As mentioned earlier, you can check by visiting https://www.yoursite.com/ads.txt.
Use Google’s Ads.txt Checker: Google provides a tool to check if your ads.txt file is set up correctly. You can visit the Google AdSense or Google Ad Manager Help Center for more details on how to test your ads.txt implementation.
6. Troubleshooting Common Issues
If you encounter any issues with your ads.txt file, here are a few troubleshooting tips:
Ensure the file is in the root directory: The file must be in the root directory of your website for it to be detected by ad networks.
Ensure the file is named correctly: The file must be named ads.txt and must be a plain text file.
Check for syntax errors: Ensure there are no extra spaces, commas, or incorrect information in the file. Each entry should follow the exact format, and the fields must be separated by commas.
Clear your website’s cache: If your website uses caching, clear the cache after uploading the ads.txt file to ensure that the changes take effect.
Conclusion
Adding an ads.txt file to your WordPress website is a crucial step in ensuring that your ad inventory is sold only through authorized sellers, improving both transparency and security. While plugins can automate this process, manually adding the ads.txt file gives you more control and flexibility. By following the steps outlined in this guide, you can easily create, upload, and maintain the ads.txt file without needing any plugins. Regularly updating the file is essential for ensuring that your ad inventory remains secure and that your relationships with ad networks remain transparent.
By implementing the ads.txt file correctly, you’ll safeguard your website from ad fraud and enhance your revenue potential. It’s a small but impactful step that can help you maintain a legitimate and trustworthy presence in the digital advertising ecosystem.
Related Topics
- How to Access CPanel WordPress?
- How Often Does WordPress Update?
- How Much Traffic Can WordPress Handle?