You are currently viewing [SOLVED] How To Add A Hostname And IP To The Hosts File On Windows? – Check How Easy It Is In 3 Minutes!
Could You Please Share This Post? I Appreciate It And Thank YOU! :) Have A Nice Day!
4.8
(78)

To add a hostname and IP to the hosts file on Windows you need to do few simple steps. Please go through these post and you will learn how to edit hosts file!

You Can Ask: How do I add entries to my host file?

This is why I am here to share this knowledge with you in a very short and easy to understand way! Don’t wait any longer, we just get down to case.

1. Run the notebook as Administrator

Firstly open Menu Start and Run Notepad as Administrator. It will allow you to edit hosts file.

How to add a hostname and IP to the hosts file on Windows? - check how easy it is in 3 minutes!

2. Host File Location In Windows

In the open notebook, click “File -> Open ...” and indicate the path to the hosts file that I gave below.

To make the host file visible, choose from the list “All files (*)“.

3. Let’s Edit Hosts File Windows 10

At the bottom of the open file, we add an entry. I added that port 127.0.0.1 is supposed to solve the name of the host “cloudera“. In that, in the search engine instead of entering the IP address now, it will be possible to use the host name.

Save file and go the the next step.

C:\Windows\System32\drivers\etc
How to add a hostname and IP to the hosts file on Windows? - check how easy it is in 3 minutes!
How to edit hosts file

4. Verification

Verification that our hostname is solved correctly on the IP address can be performed using the “Command Prompt” and the “pingcommand available under Windows system.

As you can see in the screenshot below, the name “cloudera” was correctly solved to the address “127.0.0.1”.

How to add a hostname and IP to the hosts file on Windows? - check how easy it is in 3 minutes!

In case we made a mistake, we received the information:

 

C:\>ping test_host Ping request could not find host test_host. Please check the name and try again.

That’s all about how To add a hostname and IP to the hosts file on Windows! Hope you liked my post. If it was helpful please share this post. I will help me to reach more people and spread my blog.

We strongly encourage you to view other interesting posts that you can find on our blog. Go to the home page or use the search engine or the Tags tree.

Could You Please Share This Post? 
I appreciate It And Thank YOU! :)
Have A Nice Day!

BigData-ETL: image 7YOU MIGHT ALSO LIKE

How useful was this post?

Click on a star to rate it!

Average rating 4.8 / 5. Vote count: 78

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?