How to Update Windows Hostfile to ensure domain points to a specified IP address#

Note: this will trick your browser on the machine with the hosts file only.

The hosts file is normally found at the following path:

C:\Windows\System32\drivers\etc\hosts

Edit the file with a text editor, if for example you want to force domain www.domain.com to point to IP address 1.1.1.1, you would add the following entry to the hosts file. Remember to remove the entry when you are finished.

# Copyright (c) 1993-2006 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
::1             localhost

1.1.1.1 domain.com
1.1.1.1 www.domain.com

Save the file and close down all browsers after each change. Now hit www.domain.com from your browser and it will be pointing to the specified IP.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-7) was last changed on 24-May-2017 15:30 by Hyve Support
G’day (anonymous guest) My Prefs
  • View Page Source
  • This clear IPSec security association,
    clear ipsec sa peer X.X.X.X
    

All Pages

Page views: 3126

Private Tomcat

Linux

MySQL

Email

SQL Server

ASP

JSP

C#

Web Mail

Windows Plesk

Linux Plesk

PHP

Gaming

ASP.NET

Persits ASPUpload

Wiki Help

Referring Pages:
...nobody

JSPWiki v2.8.1