What Are File Hosts? How To Point Hosts File On Windows And Mac

October 1, 2022 26hotness 0likes 0comments


If you move websites and disrupt the website's operation, that's a bad thing. This article will help your website not be interrupted for a second at all. Or simply you have not bought a domain name but want to make a website first? With Hosting Vietnam, refer to how to point the host file in this article!

What is the hosts file?

File host is understood as the File that we can navigate the domain name to any IP. The domain name navigation in the hosts file only applies to the computer being navigated, the computer will give priority to receiving the IP in the hosts File instead of the actual pointing domain name IP. Point the hosts file to transfer, test websites and web-based applications, or create internal websites (Only those who know the domain and IP can access the website)

Application of File hosts:

  1. Private Network: Private websites and apps known only to You or your group of friends. Example You have an internal or academic exchange website, do not want to publish to the internet, or do not let google bots see. You can apply this method. Only those who know IP and domain can access
  2. Test website / web-based application: This way You can test the web before running it. Very good for using the new web version to update the old version. This allows to test the correct url, without using another subdomain or url.
  3. Transfer website without interruption of service: This is a common operation when transferring a website from the old host to the new hosting. You point the hosts file to congfig first, after testing all the problems, You point back to the domain name and the website does not have any downtime for 1 second. This is also the way that Hostagy supports Customers to transfer data to the service!
  4. Block any website: You just need to point to any other IP that is not correct with the original IP of that website, that website is inaccessible.
  5. Website redirect: 1 website will be redirected to another page, if in the destination IP in the hosts file, you have to configure that website.

On Windows and Mac both support pointing the hosts file

How to point File Hosts on Windows

You open the hosts file according to the path C:\Windows\System32\drivers\etc\hosts
Open it with notepad
Then add the structure IP + Space + Your website

How to point the hosts file
For example: 11.22.33.44 hostagy.com
Then save this file.

>>See more: Instructions for using the ping website command in cmd

What if you save the hosts file error?

At this step, if you can't save, try turning off your anti-virus software, or turning off your browser. If not, please save this hosts file somewhere else (except folder C:\Windows\System32\drivers\etc)
Save as hosts.txt. Then you remove the .txt extension so that the file is in the form of hosts. Then copy and overwrite this file C:\Windows\System32\drivers\etc is fine.
To make sure your navigation is correct, open cmd and ping domain okay. If you get the correct IP, it's ok :)
At this time, only your computer can access the website at the new server

How to point the hosts File on Mac

Open a terminal and type the command:

sudo nano /private/etc/hosts

Hoặc sudo nano /etc/hosts

Then press Enter

=> Enter the Mac OS login password

Then enter the IP and domain in the form

IP + Space + domain

Mac OS sua file hosts 3

So you have finished pointing the hosts file

>>See more: 3 easiest ways to check website IP address / domain name

Note when pointing the hosts file:

# (Hash sign) at the beginning of each line means that line is disabled

For example:
#11.22.33.44 hostagy.com

=> then this line has no effect on navigation in hosts file.

Best Domain - Hosting - VPS Provider in Vietnam

As a unit in the top 3 in the field of website hosting services in Vietnam, Hosting Vietnam is considered as the place with cheap hosting and always receive many recommendations from computer forums about where Where is a good place to buy a host? . From only 40,000 VND/month, users have immediately got themselves a host to freely study, research or run a demo website… Besides, Hosting Viet is also a pioneer in cloud computing technology. cloud hosting), package server rental with unlimited bandwidth.

Hosting Vietnam has a variety of service packages, besides super cheap packages of 40,000 VND/month, the provider also has cheap vps quality for different business groups. These packages always meet the storage needs, accessing tens of thousands of people every day.

In addition, with professional customer care service, a team of highly qualified technicians will quickly support and handle arising problems. From there, helping users get a smooth and enjoyable experience.

So through this article Vietnamese Hosting has helped you understand What are File Hosts? How To Point Hosts File On Windows And Mac! If you find this article useful, please subscribe to follow the latest information from Hosting Viet. Good luck!





Source link

hostadmin

This person is a lazy dog and has left nothing

Comments