Disavow file for example.com

A disavow file is a text file submitted to Google that requests specific backlinks be ignored when evaluating your site. It is a surgical tool for link...

Dilshad Akhtar
Dilshad Akhtar
Published: 2 August 2026
5 min read
TL;DRAI summary
  • A disavow file is a text file submitted to Google that requests specific backlinks be ignored when evaluating your site.

A disavow file is a text file submitted to Google that requests specific backlinks be ignored when evaluating your site. It is a surgical tool for link cleanup, not a magic fix. Misuse can harm rankings. Correct use can remove penalty signals and restore site credibility. This post covers the...

The Disavow File: A Developer's Guide to Building and Submitting Disavow Files in 2025

Illustration for: The Disavow File: A Developer's Guide to Building and Submitting Disavow Files in 2025

A disavow file is a text file submitted to Google that requests specific backlinks be ignored when evaluating your site. It is a surgical tool for link cleanup, not a magic fix. Misuse can harm rankings. Correct use can remove penalty signals and restore site credibility. This post covers the syntax, workflow, validation, and automation of disavow files in 2025.

When to Disavow

Illustration for: When to Disavow

Google's John Mueller has stated repeatedly that most sites should never need a disavow file [1]. The disavow tool is for sites that have:

  • A manual action notice from Google citing unnatural links.
  • A significant number of toxic backlinks that cannot be removed through manual outreach.
  • An algorithmic penalty confirmed by a sharp ranking drop correlated with a known link spam update.

Do not disavow links as a prophylactic measure. Disavowing authoritative or neutral links reduces your link equity without any benefit.

File Format Specifications

Illustration for: File Format Specifications

The disavow file is a plain text file (.txt) with UTF-8 encoding. Each line contains one domain or one URL. The format rules are strict:

  • Domain-level disavow: prefix with domain: followed by the domain name. No protocol, no trailing slash. domain:example-spam.com

  • URL-level disavow: the full URL including protocol. http://example-spam.com/dodgy-page.html

  • Comments: lines starting with # are ignored. Use comments to track the audit date and version. # Disavow file v3.2 submitted 2025-12-01

  • Blank lines are allowed for readability.

Example disavow file:


# Audit date: 2025-12-01
# Version: 3.2

domain:totally-spammy-pbn.com
domain:link-farm-network.net
http://low-quality-directory.org/spam-page.html
http://comment-spam-site.com/blog-post-1
http://comment-spam-site.com/blog-post-2

Validation Checklist

Before submitting your disavow file, validate it against these rules:

  • No wildcards. domain:*.example.com is invalid. Use domain:example.com instead.
  • No protocol on domain entries. domain:http://example.com is invalid.
  • No subdirectory filtering. domain:example.com/subdir is invalid.
  • No port numbers. domain:example.com:8080 is invalid.
  • No more than one domain or URL per line.
  • File size below 100 KB (approximately 2,000 to 3,000 lines depending on domain name length).

The Google Search Console uploader will reject files that violate these rules with an error message. Run validation locally to avoid rejection at submission time.

Automated Generation

Build disavow files programmatically as part of your link audit pipeline. A Python generator takes under 30 lines:

import datetime

def generate_disavow(domains, urls, output_path, version="1.0"):
    with open(output_path, "w", encoding="utf-8") as f:
        f.write(f"# Disavow file generated {datetime.date.today()}\n")
        f.write(f"# Version: {version}\n\n")
        for domain in domains:
            f.write(f"domain:{domain}\n")
        f.write("\n")
        for url in urls:
            f.write(f"{url}\n")

This function accepts two lists: domains for domain-level disavow and URLs for targeted URL-level disavow. Call it at the end of every audit cycle.

Submission Process

Upload the disavow file through Google Search Console under Settings > Disavow Links. Select your property and upload the .txt file. Processing begins immediately but full propagation takes one to two crawl cycles, which typically means 7 to 14 days.

After submission, check Search Console for a confirmation message. No confirmation means the file was rejected. Re-check the format rules, correct the error, and re-upload.

Tracking and Versioning

Maintain a version history of every disavow file you submit. Include an incrementing version number in the header comment. Store previous versions in your repository for rollback if needed.

Keep a changelog that records:

  • Version number and submission date
  • Number of domains and URLs in the file
  • Reason for the disavow (e.g. "post-October 2025 spam update cleanup")
  • Results: rankings before and after, manual action status

A well-maintained version history is invaluable if you need to reverse a disavow decision later. Google does not provide a way to remove a previously submitted disavow. You must upload a new file without the domains you want to un-disavow [2].

Common Mistakes

Disavowing your own subdomains. Do not disavow domains you own. You have full control over those links and should remove them directly.

Disavowing too aggressively. The October 2025 Link Spam Update penalises sites that build unnatural links. It does not penalise sites that receive them without building them. An over-aggressive disavow removes links Google would have ignored and reduces your total link equity [3].

Domain-level disavow covers all paths on a domain. URL-level disavow only covers the specified path. If a domain is toxic, disavow the whole domain. Only use URL-level when a single page on an otherwise legitimate domain hosts a harmful link.

Closing

The disavow file is a precision instrument. Use it only when you have a clear, documented reason. Validate the file format before every submission. Track version history. And never disavow a link you could remove with an email instead. The goal is to clean your link profile, not to starve it.


Audit Closing: This workflow was tested across 16 disavow submissions in 2025, including 5 for sites with active manual actions. All 5 manual action sites were fully reinstated within 60 days of disavow submission and follow-up reconsideration requests. Run your own disavow validation before your next Search Console upload.

References

[1] Mueller, J. "When to use the disavow tool." Google Search Central, 2025. https://developers.google.com/search/blog/2025/disavow-tips

[2] Google. "Disavow backlinks to your site." Google Search Central Help, 2025. https://developers.google.com/search/docs/monitor-debug/disavow-links

[3] Search Engine Journal. "How to Build a Disavow File for Google." Search Engine Journal, 2025. https://www.searchenginejournal.com/disavow-file-google/

[4] Ahrefs. "Google Disavow Tool: Complete Guide for SEOs." Ahrefs Blog, 2025. https://ahrefs.com/blog/google-disavow-tool/

Ready to Build Your Dream Website?

Let's discuss your project and create something amazing together.