Home / Guides / Setting up ads.txt
How to add ads.txt to a WordPress site
By the ads-txt.in team · Published November 8, 2026
WordPress does not create an ads.txt file by default, but adding one takes only a few minutes. You can upload the file directly through your hosting account, or manage it from the WordPress dashboard with a plugin.
Before you start
Create the contents of your file with our ads.txt generator and download it. Make sure the file is called exactly ads.txt.
Method 1: Upload to the root folder
- Log in to your hosting control panel (cPanel, hPanel, aaPanel, Plesk or similar) and open the File Manager.
- Go to the folder where WordPress is installed. It is the folder containing wp-config.php, wp-admin and wp-content, often called public_html or named after your domain.
- Upload ads.txt to this folder, or create a new file with that name and paste the contents.
- Visit https://yourdomain.com/ads.txt to confirm it shows plain text.
You can also upload the file with an FTP client such as FileZilla, using the same folder.
Method 2: Use a plugin
If you cannot access your hosting files, install a plugin that manages ads.txt, such as Ads.txt Manager. After activating it, open its settings page, paste your lines and save. The plugin serves the file at the correct address without you touching the server.
Use only one method. If you upload a physical file and also use a plugin, the physical file usually wins, which can be confusing when you edit the plugin settings and nothing changes.
WordPress in a sub-folder
If WordPress is installed at example.com/blog, the ads.txt file must still be at example.com/ads.txt, in the root of the domain, not inside the blog folder.
Caching and security plugins
After updating the file, clear any page cache or CDN cache so visitors and crawlers see the new version. Some security plugins or firewalls block unknown bots; if our checker cannot reach your file but your browser can, check those settings.
Check it
Run our ads.txt checker. It confirms the file is reachable, returns HTTP 200, is plain text and contains valid lines.