Write a disavow file for Google
disavow_fileWrite the disavow file for Google's disavow links tool (https://search.google.com/search-console/disavow-links). Google has no API to upload it, so you give the user the file and they upload it themselves. Disavowing is rarely needed and can lower rankings when good links are thrown away: use it after a manual action for unnatural links in Search Console, or for links the site clearly paid for or built in a scheme; Google already ignores ordinary spam links, so a high spam score alone is not a reason. Pass the domains (whole sites, the usual choice) and/or single URLs to disavow, each with a short reason, from the user's backlink data (Ahrefs, Semrush, SE Ranking, bing_backlinks, an attached export). Each upload REPLACES the list Google has, so if the user already uploaded one, ask them to download it from the tool and pass it as current: this tool keeps its lines and adds the new ones. remove takes lines back out (links the user no longer wants disavowed). Answers with the whole file, what was added, kept and dropped, and how to upload it. It works only for a URL-prefix property in Search Console (https://www.example.com/), not a Domain property.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | The site the links point to, like https://www.example.com (its own domain is never disavowed) | |
| urls | No | Single linking pages to disavow, full addresses | |
| reason | No | Reason for the entries that have none of their own, like "paid links, manual action 2026-10" | |
| remove | No | Domains or URLs to take out of current | |
| source | No | Where the list came from, written at the top of the new part, like "Ahrefs export 2026-10-09" | |
| current | No | The file Google has now, as text (Search Console's disavow tool downloads it), so its lines are kept | |
| domains | No | Linking sites to disavow whole, as a name (spam.example) or an address on it; with a reason each when you can |