Monday , February 3 2025

How to prevent the site from initiating downloads automatically

You can block auto-downloads from a specific website on Windows, macOS, Linux, and ChromeOS by adjusting browser settings or using firewall rules:

For Google Chrome (Windows, macOS, Linux, ChromeOS)

  1. Open Chrome.
  2. Click the three-dot menu in the top-right corner and select Settings.
  3. Navigate to Privacy and security → Site settings.
  4. Scroll down to Additional permissions → Automatic downloads.
  5. Click Add under the Block section.
  6. Enter the website URL (e.g., https://example.com) and click Add.

For Microsoft Edge (Windows, macOS, Linux)

  1. Open Edge.
  2. Click the three-dot menu → Settings.
  3. Go to Cookies and site permissions → Automatic downloads.
  4. Toggle “Ask when a site tries to download multiple files automatically” to On.
  5. Click Add under the Block section and enter the website URL.

For Mozilla Firefox (Windows, macOS, Linux)

  1. Open Firefox.
  2. Type about:config in the address bar and press Enter.
  3. Search for browser.download.autohideButton.
  4. Set it to false (optional: this keeps the download button visible).
  5. Install an extension like uBlock Origin to block auto-download scripts for a specific site.

For Safari (macOS)

  1. Open Safari.
  2. Click Safari → Settings (or Preferences).
  3. Go to the Websites tab → Downloads.
  4. Locate the website and set it to Deny.
  5. If the site is not listed, visit it first, then return to this setting.

For Windows (System-Level Block)

If you want a more aggressive block, you can use Windows Defender Firewall:

  1. Open Windows Security → Firewall & network protection.
  2. Click Advanced settings.
  3. Select Outbound Rules → New Rule.
  4. Choose Custom → This program path → Browse to the browser’s .exe file.
  5. Click Next → Select Block the connection.
  6. Apply the rule to Public, Private, and Domain networks.
  7. Under Which IP addresses this rule applies to, add the website’s IP address (use nslookup example.com in Command Prompt to find it).

For Linux (Using UFW Firewall)

  1. Open a terminal and run: sudo ufw deny out to example.com
  2. To find the site’s IP, use: nslookup example.com
  3. If using a hosts file block, add the domain to /etc/hosts: sudo nano /etc/hosts
    Add: 127.0.0.1 example.com
    Save and exit.

For ChromeOS (Chromebook)

  1. Open Chrome and go to chrome://settings/content/automaticDownloads.
  2. Toggle “Ask when a site tries to download multiple files automatically” to On.
  3. Add the unwanted site under the Block list.

About iryna

I'm Iryna, a web developer from Ukraine with a decade of experience solving complex technical challenges in the world of freelance. Throughout my career, I've worked on everything from troubleshooting server-side issues and optimizing website performance to enhancing user interfaces. On this blog, I share detailed solutions to the technical problems I’ve encountered and methods that have worked best for me. In addition to my technical expertise, I’m also passionate about digital drawing. I hope the tutorials and insights I provide here will help both fellow developers and creatives alike in their own projects.

Check Also

Open expanded block by link in accorderon/spoiler/toggle

The case can be like this – for example, from the main page you need …

Leave a Reply

Your email address will not be published. Required fields are marked *