• Follow
  • Follow
  • Follow


SYSTEM STATUS



1300 093 786

Domain Central Logo
  • Domain Names
    • Domain Registration
    • Domain Transfers
    • .au Direct
  • Web Hosting
    • WordPress Hosting
    • Plesk Hosting with SiteJet
    • Community Hosting
    • SSL Certificates
  • Email Solutions
    • Titan Mail
    • Microsoft 365
    • Office 365
  • Website Services
    • WordPress Maintenance and Support
    • Website Design
    • Ecommerce Shop Web Design
help Centre

Email

  • How to Find and Provide Email Headers
  • Outlook Archiving Didn’t Reduce Email Storage (IMAP Accounts)
  • What is a DMARC Record and how do I create one: A Plain English Guide
  • Outlook
    • How to Switch from the New Outlook to Classic Outlook on Windows
  • Microsoft 365
    • How to add a domain in Microsoft 365
    • How to add a user in Microsoft 365
    • How to configure email forwarders in Microsoft 365
    • How to change user permissions in Microsoft 365
    • Configuring 2FA in Microsoft 365
    • How to assign a license to a user in Microsoft 365
    • How to add/remove aliases in Microsoft 365
    • How to Create a User with Global Administrator Permissions in Microsoft 365
    • How to configure your Microsoft365 email account in Outlook
  • Smartermail
    • How do I access the Smartermail Webmail Portal

Domains

  • Eligibility & Allocation
    • net.au Eligibility and Allocation
    • .org.au Eligibility and Allocation
    • .com.au Eligibility and Allocation
    • .au Direct Eligibility and Allocation

Error Codes

  • Outlook Error 0x800ccc0d or 0x800ccc0f

Getting Started

  • Creating and Managing Support Tickets in the Client Area
  • How to login to the Client Area
  • Client Area vs. Control Panel; where do I go?

Web Hosting

  • How to Redirect a Page or Website Using .htaccess
  • How to Temporarily Point a Website to a Different IP Address Using the macOS Hosts File
  • How to Temporarily Point a Website to a Different IP Address Using the Windows Hosts File
  • How to purchase additional hosting resources
  • How to Create a DMARC Record in cPanel
  • WP Squared
    • Configure CDN on WP Squared
    • Add or Remove a Forwarding domain in WP Squared
    • How do I create a backup in WP Squared?
    • Using File Manager in WP Squared
    • Manage Files and Folders in WP Squared
    • Managing your website in WP Squared
    • How to Enable Two-Factor Authentication (2FA) in WP Squared
    • How to Disable or Reset Two-Factor Authentication (2FA) in WP Squared
    • How to Create a Staging Website Copy in WP Squared
    • How to Clear the NGINX Cache in WP Squared
    • How do I create my website in WP Squared?
    • How do I change/reset my WP Squared Hosting Password?
  • cPanel
    • How to Redirect a Page or Website Using .htaccess
    • How to Remove a CSR code in cPanel
    • How to Generate a Certificate Signing Request (CSR) in cPanel
    • How to Retrieve a CSR from cPanel

WordPress

  • Simplifying Your Website’s Speed: A Step-by-Step Guide to Installing LiteSpeed Cache Plugin
  • Is LiteSpeed Cache Already Installed on Your WordPress Site? Here’s How to Check
  • How to Remove Sample Comments and Posts From WordPress
  • How to Deactivate and Delete a WordPress Plugin
  • How to Manually Install a WordPress Plugin
  • How to Delete a WordPress Theme
  • How to Manually Install a WordPress Theme
  • Litespeed WordPress Cache Plugin Configuration
  • How to Install a New WordPress Theme
  • How to Install a WordPress Plugin
  • How to Write and Publish Your First Blog Post in WordPress
  • How to Access the WordPress Admin Dashboard

DNS & Nameservers

  • How to add an SPF record for your domain from the client area

Transferring to Us

  • How to transfer your domain to Domain Central

Troubleshooting

  • How to perform a Traceroute
  • How to take a Screenshot for Support
  • How to Run a Traceroute to a Website from Your Computer
  • How to Let Our Support Team Access Your Windows 10 or 11 Computer Using Quick Assist
  • How to Clear the Browser Cache on Edge, Chrome, Safari, and Firefox
  • Is my website or the server down?
  • Outlook Archiving Didn’t Reduce Email Storage (IMAP Accounts)

Security

  • Has Your Email Address Been Pwned?
  • SSL Certificates
    • How to Remove a CSR code in cPanel
    • How to Retrieve a CSR from cPanel
    • How to Generate a Certificate Signing Request (CSR) in cPanel
    • Do I need an SSL Certificate?
View Categories
  • Home
  • Help
  • Web Hosting
  • How to Temporarily Point a Website to a Different IP Address Using the Windows Hosts File

How to Temporarily Point a Website to a Different IP Address Using the Windows Hosts File

4 min read

The Windows hosts file allows you to temporarily tell your computer to load a website from a specific IP address, without changing the website’s public DNS records.

This is useful when testing a website on a new server before updating DNS, checking a migration, or previewing a site before it goes live.


What does the hosts file do? #

Normally, when you visit a website such as example.com, your computer checks DNS to find the server IP address for that domain.

The hosts file lets you override this lookup on your own computer only. This means:

  • The change only affects your computer.
  • It does not change public DNS.
  • Other visitors will still see the normal live website.
  • You can safely remove the entry when testing is complete.

Important before you begin #

You will need:

  • The domain name you want to test.
  • The IP address of the server you want the domain to load from.
  • Administrator access on your Windows computer.

Example:

192.0.2.123 example.com
192.0.2.123 www.example.com

Replace 192.0.2.123 with the server IP address you have been provided.


Step 1: Open Notepad as Administrator #

  1. Click the Windows Start button.
  2. Type Notepad.
  3. Right-click Notepad.
  4. Select Run as administrator.
  5. If Windows asks for permission, click Yes.

Opening Notepad as administrator is important. If you do not do this, Windows may not allow you to save the hosts file.


Step 2: Open the hosts file #

In Notepad, click:

File > Open

Then browse to:

C:\Windows\System32\drivers\etc

By default, Notepad may only show text files. In the bottom-right corner of the Open window, change:

Text Documents (*.txt)

to:

All Files (*.*)

You should now see a file named:

hosts

Select the hosts file and click Open.


Step 3: Add your temporary IP entry #

At the bottom of the hosts file, add the IP address followed by the domain name.

For example:

192.0.2.123 example.com
192.0.2.123 www.example.com

Make sure there is at least one space between the IP address and the domain name.

If you want both the non-www and www versions of the website to load from the new IP address, add both entries.


Step 4: Save the hosts file #

Click:

File > Save

If Windows asks for confirmation, allow the file to be saved.

If you receive a permission error, close Notepad and repeat the steps above, making sure you open Notepad using Run as administrator.


Step 5: Clear your DNS cache #

After saving the hosts file, you may need to clear your local DNS cache.

  1. Click the Windows Start button.
  2. Type Command Prompt.
  3. Right-click Command Prompt.
  4. Select Run as administrator.
  5. Run the following command:
ipconfig /flushdns

You should see a message confirming that the DNS Resolver Cache has been flushed.


Step 6: Test the website #

Open your web browser and visit the domain name.

If the hosts file entry is working, your computer should now load the website from the IP address you entered.

If the website still shows the old version, try:

  • Closing and reopening your browser.
  • Clearing your browser cache.
  • Using a private/incognito browser window.
  • Checking that the IP address and domain name were entered correctly.

How to remove the temporary hosts file change #

Once testing is complete, you should remove the temporary hosts file entry.

  1. Open Notepad as administrator again.
  2. Open the hosts file from:
C:\Windows\System32\drivers\etc\hosts
  1. Delete the lines you added.
  2. Save the file.
  3. Flush DNS again using:
ipconfig /flushdns

Your computer will then go back to using normal public DNS for the domain.


Example hosts file entry #

If your new server IP address is 203.0.113.50 and your domain is yourdomain.com.au, you would add:

203.0.113.50 yourdomain.com.au
203.0.113.50 www.yourdomain.com.au

Troubleshooting #

The file will not save

Make sure you opened Notepad using Run as administrator.

The website still loads from the old server

Flush your DNS cache, restart your browser, and check that the hosts file entry is correct.

The website shows a security or SSL warning

This can happen if the website’s SSL certificate is not installed on the server you are testing, or if the server is not configured for that domain yet.

The website does not load at all

Check that the IP address is correct and that the hosting server has been configured to accept traffic for the domain.


Need help? #

If you are unsure what IP address to use, or the website does not load correctly after updating your hosts file, please contact our support team and we can assist.

Updated on August 20, 2026

What are your Feelings

  • Happy
  • Normal
  • Sad

Share This Article :

  • Facebook
  • X
  • LinkedIn
How to Temporarily Point a Website to a Different IP Address Using the macOS Hosts FileHow to purchase additional hosting resources
Table of Contents
  • What does the hosts file do?
  • Important before you begin
  • Step 1: Open Notepad as Administrator
  • Step 2: Open the hosts file
  • Step 3: Add your temporary IP entry
  • Step 4: Save the hosts file
  • Step 5: Clear your DNS cache
  • Step 6: Test the website
  • How to remove the temporary hosts file change
  • Example hosts file entry
  • Troubleshooting
  • Need help?
Domain Central Logo

Subscribe to our Newsletter

Services

Web Hosting

Domain Registration

Email Solutions

Domain Transfer

Website Services

Company

About Us

Blog

Contact Us

Legal

Accessibility Statement

customer service



Help Centre



Existing Client Login



Sales Enquiries



System Status

customer service



Help Centre



Existing Client Login



Sales Enquiries



System Status

Services

Web Hosting

Domain Registration

Email Solutions

Domain Transfer

Website Services

Company

About Us

Blog

Contact Us

Legal

Accessibility Statement

© Copyright Domain Central ANZ 2025

Privacy Policy • Terms of Service 

  • Follow
  • Follow
  • Follow
Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behaviour or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}