Monday, January 14, 2019

How to change the host url in Host file on Windows

Modifying your hosts file enables you to override the domain name system (DNS) for a domain on a specific machine. This comes in handy when you want to test your site without the test link prior to going live with SSL, verify that an alias site works prior to DNS changes.

The syntax stays mostly the same across in Windows, macOS, or Linux. Generally, most hosts files will have several entries for loopback. Follow the below basic syntax of a host entry.

An entry is divided into 3 parts in following way.

  1. The location to redirect the address to 
  2. The address that you will want to redirect,
  3. The comment. 
This can be separated by a space, but for ease of reading are typically separated by one or two tabs.

Follow below instructions if you are running on WIndows 10 or 8:

  1. Run NotePad or NotePad++ as Administrator.
  2. Open the following file: c:\Windows\System32\Drivers\etc\hosts 
  3. Make the necessary changes to the file.
  4. Go to File > Save your changes.

Sample host file entry for http://localhost/UmbracoDemoApp/
127.0.0.1 UmbracoDemoApp  # Sample host name
127.0.0.1 UmbracoDemoApp.local # Sample host name

4 comments:

  1. McAfee antivirus may get the user into trouble such as with the installation, reinstallation, uninstalling or the issue can also be related to some technical error code in order to get instant and accurate resolutions for all these issues and errors it is advisable that the user gets connected with the experts at McAfee Contact Number through live chats, Emails or calls.

    ReplyDelete
  2. Excellent Blog. Keep Doing. Visit us to make an excellentweb design

    ReplyDelete
  3. Thanks For Sharing And Very Useful Information Norton Support Help Number Uk for more information or help then in that case, it is advisable that the user gets connected with the certified Norton technical team.

    ReplyDelete
  4. I am really amazed after reading this post as every single piece of the sentence is written very carefully and hence, anyone can understand the topic very easily.Install BullGuard Mobile Security on Android:

    ReplyDelete