Software⏱️ 3 min read📅 2026-06-11

How to Fix: Wget error bash Windows Subsystem for Linux

Wget error in WSL on Windows Subsystem for Linux

Quick Answer: The issue is caused by the HSTS database not being a regular and non-world-writable file. To fix, run wget with the --no-hsts option: wget -O quotefile.txt --no-hsts https://www.google.com

The error 'Will not apply HSTS. The HSTS database must be a regular and non-world-writable file.' is seen in Wget while trying to download using wget on Windows Subsystem for Linux (WSL). This issue primarily affects users who have recently installed or updated their WSL environment.

This frustrating error can hinder the ability to download files efficiently, especially when using wget. In this guide, we will outline the root causes of this issue and provide step-by-step solutions to resolve it.

💡 Why You Are Getting This Error

  • The primary reason for this error is that the HSTS database must be a regular and non-world-writable file. The wget-hsts store at '/home/atul/.wget-hsts' is world writable, which prevents wget from accessing it.
  • An alternative reason could be related to the version of WSL or Windows 10 Pro Version changes. However, this is less likely to be the cause in your scenario since you mentioned a fresh reinstall.

🛠️ Step-by-Step Verified Fixes

Update wget-hsts store to make it non-world-writable

  1. Step 1: Open a terminal in WSL and navigate to the '/home/atul/.wget-hsts' directory using the 'cd' command.
  2. Step 2: Run the 'chmod 600 .wget-hsts' command to set the permissions of the file to read-only for the owner.
  3. Step 3: Try running wget again to see if the error persists.

Check WSL and Windows 10 Pro Version compatibility

  1. Step 1: Open a terminal in WSL and run the 'wget --version' command to check the current version of wget.
  2. Step 2: Compare the version of wget installed on your system with the one available on the official website. If there's an update, download and install it using the package manager (e.g., apt-get or yum).
  3. Step 3: Try running wget again to see if the error persists.

🎯 Final Words

To resolve the 'Will not apply HSTS. The HSTS database must be a regular and non-world-writable file.' error in Wget while using Windows Subsystem for Linux, try updating the wget-hsts store or checking for compatibility issues between WSL and Windows 10 Pro Version changes.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions