To use the Sortable hosted ads.txt feature, you need to redirect from:
https://<YOURDOMAIN>/ads.txt
to the URL provided on your Ads.txt page in Sortable Analytics (for example, https://adstxt.sortable.com/<YOURDOMAIN>/ads.txt)
This article is for informational purposes only. For further instruction, we recommend consulting with your platform vendor.
We strongly recommended that you back up all files and test on a staging system before making any changes.
The exact steps to creating a redirect are dependent on the specific web hosting software/provider. Below are samples to redirect 'example.com' for a few common platforms.
WordPress
There are several plugins available for WordPress to configure redirects. Redirection is a popular option available in the official WordPress Repository (https://wordpress.org/plugins/redirection/).
- After activating the plugin, navigate to Tools > Redirection.
- For the source URL, enter https://example.com/ads.txt
- For the target URL, enter https://adstxt.sortable.com/example.com/ads.txt
- Click Add Redirection.
Full documentation can be found here: https://redirection.me.
Apache
Configure redirects in Apache via the mod_rewrite engine. Place rules either in the main server configuration or in an .htaccess file.
For common file locations, see https://cwiki.apache.org/confluence/display/HTTPD/DistrosDefaultLayout
- Create the following rule in the .htaccess file for the site:
RewriteRule ^ads\.txt$
"https\:\/\adstxt.sortable\.com\/example\.com\/ads\.txt"
[R=301,L]
Full documentation can be found here: https://httpd.apache.org/docs/2.4/rewrite/remapping.html
Nginx
Nginx is highly customizable — configurations and file locations can differ between source repositories and implementations. It is strongly recommended that you work with your web administrator and platform vendor.
- Configure redirects by updating the Server Block configuration for the site:
location /ads.txt {
return 301 https://adstxt.sortable.com/<YOURDOMAIN>/ads.txt;
}
Full documentation can be found here: https://docs.nginx.com/nginx/admin-guide/web-server/web-server/
Bluehost
Use the following settings to set up your URL on Bluehost.
Wix
For more information about how to set up your URL with Wix, see https://support.wix.com/en/article/setting-up-301-redirects-from-one-url-to-another.
If you do not see your provider listed above, contact your domain hosting provider for more information about setting up your URL.