Techdows

Windows how-to guides, fixes and software downloads

  • Home
  • Settings and hardware

    • Printers
    • Sound and microphone
    • Wi-Fi and network
    • Bluetooth
    • Display and monitors
    • Drivers
    • Keyboard shortcuts and symbols

    Using Windows

    • File Explorer
    • Storage and disk space
    • Taskbar, Start and desktop
    • Apps and default programs
    • Accounts and sign-in
    • Copilot in Windows
    • Command Prompt and PowerShell

    Updates and fixes

    • Windows Update
    • Windows 11 26H2
    • Error codes and BSOD
    • Boot, BIOS and recovery
    • Security and Defender
    • Task Manager and performance
    • DLL and runtime errors

    Popular fixes

    • Get help in Windows 11
    • Connect a wireless printer
    • Re-pair Bluetooth earbuds for stereo sound
    • Cancel a stuck print job
    • Change default programs

    All Windows guides →

  • Browse by type

    • Web browsers
    • Office and productivity apps
    • PC games and launchers
    • Phone and media apps
    • Developer tools
    • Creative apps
    • CAD software
    • System utilities and drivers

    Popular downloads

    • GTA V for PC
    • YouTube app for PC
    • Google Meet for PC
    • Cisco Packet Tracer
    • TikTok for PC

    Windows tools

    • PC Health Check app
    • HEVC Video Extension
    • DirectX 12
    • Cinebench R23

    All download guides →

  • Browser guides

    • Microsoft Edge
    • Google Chrome
    • Firefox
    • Web browsers for PC

    Microsoft Edge

    • Fix WebView2 using too much memory
    • Internet Explorer mode in Edge
    • Manage Edge favorites
    • Set or remove Edge as default

    Chrome and Firefox

    • Make Chrome the default browser
    • Restore closed tabs
    • Change the default web browser

    All browser guides →

  • Office guides

    • Outlook
    • Excel
    • Word and PowerPoint
    • OneDrive
    • Install Microsoft 365

    Meetings and other tools

    • Teams, Zoom and Google Meet
    • Google Docs and Sheets
    • PDF tools

    Office apps

    • Office product key
    • Office Deployment Tool
    • What is OneDrive?
    • Turn off OneDrive in Windows 11

    Outlook and Teams

    • Outlook inbox view changed
    • Schedule an email in Outlook
    • Outlook dark mode
    • Teams breakout rooms

    All Office and productivity guides →

  • PHP security

    • PHP2Shell patch download
    • PHP critical RCE security update
    • CVE-2026-109618 fix
    • CVE-2026-109619 explained
    • Mitigations if you can't update

    Update PHP

    • Update PHP to the latest version
    • Check your PHP version
    • Update PHP on Ubuntu and Debian
    • Restart PHP-FPM

    Hosting and local servers

    • Update PHP in XAMPP
    • Change PHP version in cPanel
    • Update PHP in Laragon and WampServer
    • Update PHP Docker images
    • WordPress PHP version check

    PHP downloads

    • PHP 8.5.12 download
    • PHP 8.4.27 download
    • PHP 8.3.36 and 8.2.35 download
    • Download PHP for Windows

    PHP2Shell by platform

    • PHP 8.3 fix on Ubuntu 24.04
    • PHP 8.1 fix on Ubuntu 22.04
    • PHP 8.2 and 8.4 fix on Debian
    • Update PHP on IIS
    • Cloudflare PHP2Shell WAF rule

    All PHP guides →

  • Sections

    • Gaming
    • Apple
    • Android
    • Apps and services
    • Developer and IT

    Apple

    • iPhone tips and fixes
    • Reset and restore iPhone
    • iPad
    • Mac and macOS
    • Apple Account and iCloud
    • Apple devices on Windows

    Apps, Android and gaming

    • Gmail and Google account
    • YouTube
    • Social media accounts
    • Streaming TV
    • Android and Samsung Galaxy
    • PC gaming and Xbox
    • Roblox and Minecraft on PC

    Developer and IT

    • WSL and developer setup
    • Virtual machines
    • Group Policy and Intune
    • Windows Server
    • Website error codes
  • News
Home › How to › How to Reset Hosts File to its default

How to Reset Hosts File to its default

December 12, 2009 by Venkat Eswarlu

Hosts file in Windows is used to look for websites IP address whenever you type the website URL in your browser, Since IP addresses for websites won’t be in the Hosts file, your computer will ask your ISP to look for IP addresses of websites and open them. Unknowingly, if you made any modifications to the hosts file or some malware hijacked your hosts file, then you can reset hosts file to its default without affecting websites redirecting problems.

Hosts file location

Hosts file is hidden and will be located at “%WinDir%\system32\drivers\etc “. You need administrative privileges to access or modify the contents of the file.

hosts file in Windows XP

Windows Hosts File Generator

Fix to “ Host File contains forbidden domain name guru.avg.com Detected on Open”

To reset the hosts file to default

1. Navigate to hosts file by entering “%WinDir%\system32\drivers\etc “ in Run command box and press enter.

2. Now rename hosts file to hosts.bak or other extension old.

3. Now right click on empty space in that directory and select New>TEXT Document and type it’s name as hosts. Click ‘Yes’ to confirm changes and hosts file extension should not be text.

4. Now open this empty hosts file with notepad and paste the below text under title “Hosts file for Windows XP” in it and save changes.

Hosts file for Windows XP

—————————————————————————-

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost

—————————————————————————————-

  • How to Block a Website in all Browsers
  • How to Fix ”Google Error We‘re sorry “

If still the hosts file appears with text extension,

  • Open Windows Explorer, from Tools menu, select Folder Options
  • Remove tick mark for “Hide extensions for known file types” and now remove the txt extension after hosts file, and save the changes .

Update 26/02/11 :  Download and run this Microsoft Fixit tool to automatically reset Hosts file to default.

Venkat Eswarlu
Venkat Eswarlu

Venkat is an independent technology journalist and the founder of Techdows. He has been covering web browsers, Windows, and software news since 2009. His exclusive scoops on Chrome, Firefox, and Edge features have been cited by Forbes, TechCrunch, Wired, CNET, and other major publications.

More in How to

Fix Windows 11 Bluetooth issues: quick troubleshooting guideFix Windows 11 Bluetooth issues: quick troubleshooting guide5 hours agoHow to download apps from AppStore – quick and easy guide!How to download apps from AppStore – quick and easy guide!5 hours agoCheck Python version in Windows CMD: quick guide to installers and py launcherCheck Python version in Windows CMD: quick guide to installers and py launcher5 hours agoHow to truncate text in Excel: 6 methodsHow to truncate text in Excel: 6 methods5 hours agoExpressVPN router setup help: quick installation guideExpressVPN router setup help: quick installation guide4 hours agoHow to restart your router: Quick and easy stepsHow to restart your router: Quick and easy steps4 hours ago
Posted in: How to, Security, Tips and Tricks Tagged: Hosts file, reset hosts file

More from Techdows

Fix Windows 11 Bluetooth issues - wireless Bluetooth headphones
Fix Windows 11 Bluetooth issues: quick troubleshooting guide
How to · 5 hours ago
Download apps from the App Store - iPhone home screen with the App Store icon
How to download apps from AppStore – quick and easy guide!
How to · 5 hours ago
Check Python version in Windows CMD - code on a dark monitor screen
Check Python version in Windows CMD: quick guide to installers and py launcher
How to · 5 hours ago
Truncate text in Excel - spreadsheet data table on a printed report
How to truncate text in Excel: 6 methods
How to · 5 hours ago
ExpressVPN router setup - connected network nodes
ExpressVPN router setup help: quick installation guide
How to · 4 hours ago
Restart your router - power socket for unplugging and power-cycling the router
How to restart your router: Quick and easy steps
How to · 4 hours ago
Import-CSV reading CSV files with PowerShell - script code on a dark screen
Import-CSV: Reading CSV files with PowerShell
How to · 4 hours ago
Speed up Windows 11 with cache cleanup - NVMe SSD and DDR5 RAM inside a PC
Speed up Windows 11 with built-in cache cleanup: Step-by-step
How to · 4 hours ago

© 2009–2026 Techdows · About · Contact · Privacy Policy

Copyright © 2026 Techdows.

Techdows WordPress Theme by Techdows