Link Building

Disavow File Template: Format, Syntax and When to Upload It

By BacklinkPrice Team · Nov 29, 2026 · 9 min read
Cover for Disavow File Template: a shield icon on a dark blue background

A disavow file is a plain text file that tells Google to ignore specific backlinks. One URL or domain per line, domain: for whole domains, under 100,000 lines and 2MB, and upload only with a manual action or links you built.

Quick answer: A disavow file is a plain text file that tells Google to ignore backlinks to your site. Each line holds one URL or one domain with a domain: prefix, lines that start with a hash are comments, and the file must stay under 100,000 lines and 2MB. Upload it only when you have a manual action or links you built yourself, according to Google Search Console Help.

TL;DR: One URL or domain per line, domain: for whole domains, plain text under 100,000 lines and 2MB, according to Google Search Console Help, and upload only when Google tells you to or when you built the links.

Key takeaways

  • A disavow file is a text file encoded in UTF-8 or 7-bit ASCII, and the file name must end in .txt, according to Google Search Console Help.
  • Specify one URL or domain per line, and prefix a domain with domain:, for example domain:example.com, according to Google Search Console Help.
  • The file must stay under 100,000 lines, including blank lines and comment lines, and under 2MB, according to Google Search Console Help.
  • The maximum URL length is 2,048 characters, according to Google Search Console Help.
  • You cannot disavow an entire subpath, such as example.com/en/, according to Google Search Console Help.
  • The disavow tool does not support Domain properties, according to Google Search Console Help, so use a URL-prefix property to upload the file.

What a disavow file is

A disavow file is a list of links you ask Google to ignore when it judges your site. You upload it in Search Console, and Google stops counting those links toward your rankings. It does not remove the links from the web, and it does not tell the linking site anything.

The tool is advanced and should be used with caution. According to Google Search Console Help, using it incorrectly can harm your site's performance in search results, because disavowing good links removes the credit they were passing.

Most sites never need one. Google's SpamBrain system already ignores most spam links on its own, so a disavow file is for the cases Google flags or the links you built yourself. A toxic backlink that you did not build and that Google has not flagged is usually best left alone.

Google launched the tool in October 2012, in response to the Penguin update, according to LinkForce. Google's own documentation describes the disavow as a strong suggestion rather than a directive, so the file asks Google to ignore links instead of ordering it to.

The template

The template below follows Google's exact format. One URL or domain per line, no subpaths, no extra columns, and no formatting beyond plain text. Copy it, replace the example entries with your own, and save the file with a .txt ending.

domain:spammy-directory.example
https://spammy-blog.example/bad-page.html
https://paid-link-network.example/links.html
domain:comment-spam.example

Lines that start with a hash character are comments, and Google ignores them. Use comments to record why each entry is in the file, such as the date you found it and the tool that flagged it. Comments count toward the 100,000-line limit, according to Google Search Console Help, so keep them short.

The domain prefix covers a whole domain, including its subdomains. Use it when every link from a domain is spam, and use single URLs when only one page on a good domain is the problem. The choice matters, because a domain entry ignores every link from that domain at once.

You cannot disavow a subpath. According to Google Search Console Help, an entry such as example.com/en/ is not allowed, so list the full URLs on that path or disavow the whole domain instead.

Entry typeFormatWhen to use it
Single URLhttps://example.com/page.htmlOne bad page on an otherwise fine domain
Whole domaindomain:example.comEvery link from the domain is spam
Subdomaindomain:links.example.comSpam comes from one subdomain only
CommentA line starting with a hashNotes on why an entry is listed

Size and format limits

The file must stay under 100,000 lines, including blank lines and comment lines, and under 2MB in size, according to Google Search Console Help. The maximum URL length is 2,048 characters. Most disavow files are far smaller, and a file near the limit usually means the audit was too broad.

The file must be plain text encoded in UTF-8 or 7-bit ASCII, and the file name must end in .txt, according to Google Search Console Help. A spreadsheet or a Word document will fail to upload, so export to text and check the ending before you submit.

The disavow tool does not support Domain properties. According to Google Search Console Help, if you verified your site as a Domain property, the tool page does not apply to you, and you need a URL-prefix property to upload the file.

When to upload a disavow file

Upload a file when Google takes a manual action against your site for unnatural links. The Manual Actions report in Search Console names the problem, and a disavow file is part of the cleanup, along with removing the links you can remove. Recovering from a link penalty starts with the report, not with the file.

Upload a file when you built the links yourself. Paid links, link schemes, and comment spam you placed are links Google wants you to disavow if you cannot remove them. According to Google's spam policies, buying or selling links for ranking purposes is link spam, and the disavow tool is the way to distance your site from links you paid for.

Do not upload a file for links you did not build and Google has not flagged. Google's systems already ignore most spam, and disavowing links you do not understand can remove credit from links that were helping. A backlink audit comes first, and the file comes last.

Expect the change to take weeks. Google must recrawl the linking pages before the disavow takes effect, and the effect shows up slowly. Backlinks take time to work, and the same is true in reverse: removing their credit is not instant.

Google's Gary Illyes called disavowing a very heavy gun, according to LinkForce, and warned that if you do not know what you are doing, you can shoot yourself in the foot with it. Use the tool selectively, not as a routine cleanup step.

According to Google Search Console Help, a disavow file must be a text file encoded in UTF-8 or 7-bit ASCII, with one URL or domain per line, a maximum of 100,000 lines and 2MB, and a maximum URL length of 2,048 characters. Google warns that incorrect use can harm a site's performance in search results. Source: Google Search Console Help, checked November 2026.

Building the list

Start from the Links report in Search Console. Export the top linking sites and the top linked pages, then sort by the domains you do not recognize. A domain you have never heard of, with no traffic and no topic, is the first candidate for the file.

Check each candidate before you add it. A link from a real site in your niche is not spam, even if the site is small, and a link from a directory that lists your business is not a problem. Finding broken backlinks is a separate job from disavowing, and the two lists should not mix.

Group the entries by domain. When three or more bad pages sit on one domain, a single domain entry replaces them all and keeps the file short. When only one page is bad, use the URL entry and leave the rest of the domain alone.

Keep a copy of every version. Save the file with the date in the name, such as disavow-2026-11-30.txt, and keep the old versions so you can roll back if rankings drop after an upload. The file you upload replaces the previous one entirely, so a missing entry in the new file undoes the old disavow.

Ahrefs can help you find and prepare the list. According to Ahrefs, its disavow guide explains when you should and should not disavow links, and how to identify bad links, but Ahrefs does not submit the file to Google. You export the list, format it as a disavow file, and upload it in Search Console yourself.

Common mistakes

  • Disavowing without a manual action: Google ignores most spam on its own, so a file with no trigger usually does more harm than good.
  • Using domain entries for mixed domains: a domain entry ignores every link from that domain, including the good ones. Use URL entries for mixed domains.
  • Forgetting comments: six months later, nobody remembers why an entry is in the file. A short comment on each group saves the next audit.
  • Uploading a spreadsheet: the file must be plain text ending in .txt, and a spreadsheet will fail to upload.
  • Expecting instant results: Google must recrawl the linking pages first, so allow weeks before judging the change.

Frequently Asked Questions

What is a disavow file?

A disavow file is a plain text file that tells Google to ignore specific backlinks to your site. Each line holds one URL or one domain with a domain: prefix, and the file must stay under 100,000 lines and 2MB, according to Google Search Console Help.

How do I write a disavow file?

Write one URL or domain per line in a plain text file, use the domain: prefix for whole domains, add short comments to record why each entry is listed, and save the file with a .txt ending. The file must be encoded in UTF-8 or 7-bit ASCII.

Can I disavow part of a domain?

No. You cannot disavow a subpath such as example.com/en/, according to Google Search Console Help. List the full URLs on that path, or disavow the whole domain with a domain: entry.

Does the disavow tool work on Domain properties?

No. The disavow tool does not support Domain properties, according to Google Search Console Help. You need a URL-prefix property in Search Console to upload the file.

How long does a disavow take to work?

Weeks. Google must recrawl the linking pages before the disavow takes effect, and the effect shows up slowly. Keep a copy of the file and watch rankings for a month before judging the change.

Expert verdict

Best for: sites with a manual action for unnatural links, or sites cleaning up links they bought themselves.

Not for: sites with no manual action and no links they built, because Google already ignores most spam on its own.

Pros: the only official way to distance a site from bad links; the format is simple and free.

Cons: incorrect use can harm rankings; the tool does not work on Domain properties; results take weeks.

If the terms are still unclear, start with what a disavow file is before you build one.

Bottom line

Use the template, keep the file under 100,000 lines and 2MB, according to Google Search Console Help, upload it only with a manual action or for links you built, and keep a dated copy of every version.

Sources

BacklinkPrice Team
Written by
BacklinkPrice Team
Link building and backlink pricing research

The BacklinkPrice Team researches backlink prices, publisher sites and link building tools. We check prices and plans against each provider's own pages and date them, so you know how current the numbers are.

More from BacklinkPrice Team

Related guides