Web Hosting

How can I modify my hosts file?

Edit your hosts file to test a site before making real DNS changes.

1 min read Updated 11 Apr 2026 Guide 5 of 18

The hosts file on your computer allows you to override DNS settings for specific domains. This is a great way to test the site ahead of changing real DNS.

Basic Format: XX.XX.XX.XX domain.tld www.domain.tld

Operating System Instructions

Windows:

  • Open Notepad as administrator
  • Navigate to: c:\Windows\System32\Drivers\etc\hosts

macOS 10.0–10.6:

  • Open Terminal
  • Enter: sudo nano /etc/hosts
  • Use Control+x then y to save

macOS 10.6–10.11:

  • Open Terminal
  • Enter: sudo nano /private/etc/hosts
  • Flush cache: dscacheutil -flushcache

Linux: Use your preferred editor to open /etc/hosts

Important Notes: Include entries for all relevant subdomains. Remove test entries after completion.

Did this solve your problem?

Brilliant — glad that sorted it.

Sorry about that — let's get you a proper answer.

Still stuck?

Talk to a real human.

Our Thoothukudi team answers hosting, domain and email questions themselves — no bots, no scripts.