HomeHow toHow to add a site's IP address and domain to the /...

How to add a site’s IP address and domain to the / etc / hosts file

An IP address is a unique address that identifies an internet device or a local network. IP is the abbreviation of “Internet Protocol,” which means a set of rules governing data formats transmitted over the Internet or local networks.

Basically, IP addresses are the identifier that enables the transmission of information between network devices: they include location information and make devices available for communication. The Internet requires a method to distinguish between various computers, routers, and webpages. IP addresses provide a way to accomplish this and are an important part of how the Internet works.

An IP address is a numeric string that is separated by periods. IP addresses are represented as a series of four numbers, which may be 192.158.1.38 as examples. Each number in the set may be between 0 and 255. The whole IP address range thus varies between 0.0.0.0 and 255.255.255.255.

You can check the IP address of your server using the IP checker of VeePN. You can use the IP checker of VeePN for checking the IP address for free. Is my ip protected? You can check it on VeePN, and if you are not protected, you can protect yourself using the VeePN products. These products are excellent and value for money, and their customer support is fantastic.

Changing the hosts file requires adding two entries. Every entry includes the IP address to which the site is to be resolved and an Internet address version. What does adding IP to hosts file do? Internet address and IP address add to hosts file allows the domain name system (DNS) to override a domain on a particular machine. DNS management is helpful for testing your site without the test link before you go live with SSL. Check that the alias site works before DNS changes and other reasons related to DNS.

How to Add the IP Address to the Hosts File on Different Operating Systems

Windows

Does Windows 10 use the hosts file? The answer is Yes. Below are the steps to add the IP address to the hosts file on Windows.

1. To add the domain of compliance and IP addresses to the hosts file in Windows Operating System, click on the search box to search for Notepad in the “Start” program, right-click and choose “Run as administrator.”

2. Enter the administrator password if needed and access the File and Open submenu.

3. Paste the file path in the “File name” box in the opening window.

c:\windows\system32\drivers\etc\hosts

4. Click “Open”

5. This is the standard hosts file.

6. Add the IP address of the server to the bottom of the file and add the domain name on the same space separated line.

For example:

104.21.77.140 assignment-web.com www.assignment-web.com

7. It is still necessary to save the changes. To accomplish this, use the sub-menu File > Save or the CTRL + S keyboard shortcut.

Linux

In Linux, the following steps are used to add to hosts file:

1. The method to change the Linux hosts file is to edit the Terminal’s host content.

2. Type sudo nano /etc/hosts in the Terminal to find the Linux hosts file location and press the Enter key to accomplish this. You next need to enter the Linux user account password.

3. The image below looks like a standard Linux hosts file in the nano text editor opened:

4. Add the IP address of the server to the end of the file and add the domain name on the same space separated line. For example:

104.21.77.140 assignment-web.com www.assignment-web.com

5. It remains to save the changes. To do this, use the keys Ctrl and the X.

6. Select the option to exit with saving changes by pressing the keys Ctrl and the Y.

7. And, without changing the file name, press the Enter key.

8. Your computer now knows which server to send open site requests to. You may need to restart your computer and clean your browser cache to apply changes.

We suggest removing the address and the domain correspondence from the hosts file after the provider’s DNS data is properly updated after a week. This saves you from potential future problems: occasionally, the server address changes and, if it is hardcoded in hosts, your computer does not allow the site to be accessible.

macOS

IP address add to hosts files on macOS requires the following steps.

1. You can add the compliance domain and IP addresses in the file hosts to the File Manager Finder context menu with macOS. To accomplish this, right-click on the Finder icon, or press the touchpad with two fingers after hovering over the icon. Then choose Go to Folder.

2. In Go to Folder, specify the hosts file location in the address bar: /private/etc/hosts and click the Go button.

3. Next, you need to copy your desktop hosts file. Then open the copied file in a text editor, such as the default TextEdit editor.

4. The file must be duplicated since the original file is secured against modification.

5. This is the standard hosts file.

6. Add the IP address of the server to the end of the file and add the domain name on the same space separated line. For example:

104.21.77.140 assignment-web.com www.assignment-web.com

7. It is still necessary to save the changes. To accomplish this, use the option File > Save, or click ⌘   and S keys on the keyboard, and then the Save button in the appearing window.

8. The new file must be replaced by the old file /private/etc/hosts by dragging the modified file into the Finder window, into the /private/user/hosts directory, and confirming that it has been replaced.

9. To replace the file, you will need to follow these steps.

a. After moving a file to the Finder file manager window, click on the Authentication button.

b. Choose a substitute option by clicking the Replace button.

c. Enter the username and password of your Mac administrator and complete the operation.

d. The username and password usually match the data for approving your user account for your operating system.

LEAVE A REPLY

Please enter your comment!
Please enter your name here