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

Mac not detecting external display? How to fix itMac not detecting external display? How to fix it5 hours agoiPhone not ringing for incoming calls? How to fix itiPhone not ringing for incoming calls? How to fix it5 hours agoConvert PowerShell script (PS1) file to EXE with IExpress on Windows 11Convert PowerShell script (PS1) file to EXE with IExpress on Windows 115 hours agoEnter Safe Mode in Windows 11/10 when PC isn’t bootingEnter Safe Mode in Windows 11/10 when PC isn’t booting5 hours agoUpdating or upgrading your iPhone: how to get iOS 27 or move to a new iPhoneUpdating or upgrading your iPhone: how to get iOS 27 or move to a new iPhone4 hours agoHow to insert a watermark in WordHow to insert a watermark in Word4 hours ago
Posted in: How to, Security, Tips and Tricks Tagged: Hosts file, reset hosts file

More from Techdows

Mac not detecting external display - MacBook and Apple displays on a desk
Mac not detecting external display? How to fix it
How to · 5 hours ago
iPhone not ringing for incoming calls - hand holding an iPhone with the Apple logo
iPhone not ringing for incoming calls? How to fix it
How to · 5 hours ago
Convert PowerShell script to EXE with IExpress - script code on a screen
Convert PowerShell script (PS1) file to EXE with IExpress on Windows 11
How to · 5 hours ago
Enter Safe Mode in Windows 11/10 - backlit laptop keyboard with the Windows key
Enter Safe Mode in Windows 11/10 when PC isn’t booting
How to · 5 hours ago
Updating or upgrading your iPhone - new iPhone beside its box and a keyboard
Updating or upgrading your iPhone: how to get iOS 27 or move to a new iPhone
How to · 4 hours ago
Insert a watermark in Word - documents spelled out in letter tiles
How to insert a watermark in Word
How to · 4 hours ago
Windows key not working on Windows 11 - Windows key on a backlit keyboard
Windows key or WinKey not working on Windows 11
How to · 4 hours ago
Microsoft Authentication Broker - login spelled out in keyboard keys
What is Microsoft Authentication Broker & where to use it?
How to · 4 hours ago

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

Copyright © 2026 Techdows.

Techdows WordPress Theme by Techdows