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

How to make a custom notification sound Android: Step-by-step guideHow to make a custom notification sound Android: Step-by-step guide27 minutes agoIs WhatsApp chat history included in iCloud or iTunes device backups?Is WhatsApp chat history included in iCloud or iTunes device backups?15 minutes agoHow to fix a Windows Update error 0x800f0922How to fix a Windows Update error 0x800f092214 minutes agoHow long should an iPhone 13 battery last after replacement?How long should an iPhone 13 battery last after replacement?44 minutes agoHow to install VMware Tools on Windows 11 or 10 virtual machineHow to install VMware Tools on Windows 11 or 10 virtual machine1 hour agoOneDrive isn’t connected; signing in stuck [Fix]OneDrive isn’t connected; signing in stuck [Fix]1 hour ago
Posted in: How to, Security, Tips and Tricks Tagged: Hosts file, reset hosts file

More from Techdows

Custom notification sound on Android - Samsung Galaxy phone on a desk
How to make a custom notification sound Android: Step-by-step guide
How to · 27 minutes ago
WhatsApp chat history in iCloud or iTunes backups - iPhone with WhatsApp in the dock
Is WhatsApp chat history included in iCloud or iTunes device backups?
How to · 15 minutes ago
Fix Windows Update error 0x800f0922 - ASUS Windows laptop on a table
How to fix a Windows Update error 0x800f0922
How to · 14 minutes ago
iPhone 13 battery life after replacement - iPhone on a wireless charger
How long should an iPhone 13 battery last after replacement?
How to · 44 minutes ago
Install VMware Tools on Windows 11 or 10 - PC workstation with monitors
How to install VMware Tools on Windows 11 or 10 virtual machine
How to · 1 hour ago
OneDrive isn't connected sign-in stuck - typing on an ASUS Windows laptop
OneDrive isn’t connected; signing in stuck [Fix]
How to · 1 hour ago
Enable Streetside in Bing Maps - street-level view of a city avenue
How to enable StreetView (Streetside) in Bing Maps?
How to · 2 hours ago
Add a Home button to Microsoft Edge in Windows - Lenovo Windows laptop with keyboard and mouse on a desk
How to add a Home button to Microsoft Edge browser in Windows
How to · 2 hours ago

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

Copyright © 2026 Techdows.

Techdows WordPress Theme by Techdows