How to update your hosts file.

Posted in Notes

Every computer has a file on it which allows the owner to specify where a website is loaded from. A hosts file is a simple combination of domain names and IP addresses.

Adding a record to your hosts file means your computer will load the domain using the IP address specified, rather than the one provided by DNS.

111.222.333.444 www.domain.com
111.222.333.444 domain.com
111.222.333.555 subdomain.domain.com

Windows

  • Press the Windows key
  • Type Notepad
  • From the results, right click on “Notepad” and choose “Run as administrator”
  • From Notepad load the file C:\Windows\System32\Drivers\etc\hosts
  • Enter the IP address, followed by a space or tab, and the domain
  • Save the changes
  • Exit Notepad

Linux

  • Open a terminal window and enter sudo nano /etc/hosts.
  • Enter your password if prompted
  • Enter the IP address, followed by a space or tab, and the domain
  • Ctrl+O to save
  • Ctrl+X to close

MacOS X

  • Open a terminal window and enter sudo nano /etc/hosts.
  • Enter your password if prompted
  • Enter the IP address, followed by a space or tab, and the domain
  • Ctrl+O to save
  • Ctrl+X to close

Related Notes

November 2024

Simple Analytics: A Privacy-Focused Alternative to Google Analytics

In an era where digital privacy concerns are at the forefront of online discourse, many organisations are reassessing their tools to ensure compliance with data...

Continue reading

November 2024

Simple steps to protect your privacy online

In today’s digital world, protecting your privacy online has become essential. With personal data constantly being shared, stored, and potentially accessed by unauthorised parties, safeguarding...

Continue reading

November 2024

Introduction to Bluesky

Making the most of Bluesky after coming from whatever Twitter (𝕏) has become involves exploring the platform's unique features, adapting to its smaller, community-driven culture,...

Continue reading

November 2024

Web application security testing

With the increasing dependency on web applications in daily operations, securing these applications is paramount to safeguarding data and protecting against breaches. This blog post...

Continue reading

October 2024

Cookieless website tracking and analytics

Cookieless website tracking is a method of collecting analytics data and monitoring website behaviour without the need for traditional browser cookies. Traditionally, cookies have been...

Continue reading

October 2024

What's going on between WordPress and WP Engine?

The disagreement between WordPress and WP Engine has sparked considerable debate within the WordPress community and could have important implications for users of the WordPress...

Continue reading

More Notes Posts