Set up Windows Hosts file to redirect to other domain

To redirect to on your local machine first open the hosts file in a text editor


find the IP address of (via cmd or and paste it followed by the domain so it looks like this


Save the file.

Now if you request in your browser you will see the content of the IP 12.345.678.910. If you are using virtual hosts/server blocks you will need to add a host header to – namely the host header as this is the domain you are actually using now.

Visiting now will show you the contents of

Leave a Reply

Your email address will not be published. Required fields are marked *