# Configuring Hostname Resolution

In order to access the websites running on Homestead, you need to add the IP address and site names to your computer's host file. This file is used by your operating system to map domain names to IP addresses. In this guide, we will walk through the steps to add the IP address and site names from Homestead.yaml to the Windows host file.

Steps to Configuring Host file in Windows environment:

1. Open Homestead repository in VS Code and select Homestead.yaml file.

<div align="left"><figure><img src="https://2293038076-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQXKoDDsmF8XJ7QoW5Ou5%2Fuploads%2FUpBpRhT8yfrIaaeWEKal%2Fimage.png?alt=media&#x26;token=16c8f44d-4b0a-456b-9a6a-963f8327e25a" alt=""><figcaption></figcaption></figure></div>

2. We will add the IP address and site name from Homestead.yaml to the Windows host file.

<div align="left"><figure><img src="https://2293038076-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQXKoDDsmF8XJ7QoW5Ou5%2Fuploads%2F6NQ35sXOpyHsOgCGqU7C%2Fimage.png?alt=media&#x26;token=3c58694c-f5ca-4616-ac75-e7f419b7cf09" alt=""><figcaption></figcaption></figure></div>

3. Run command terminal as Administrator.

<div align="left"><figure><img src="https://2293038076-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQXKoDDsmF8XJ7QoW5Ou5%2Fuploads%2F1EYk6eYJbymhfNqdPYB9%2Fimage.png?alt=media&#x26;token=7ec925e0-3381-4c4d-a070-37b764e44feb" alt=""><figcaption></figcaption></figure></div>

4. Navigate to the Windows host file: In the Command Prompt, navigate to the directory where the Windows host file is located by typing the following command:

```bash
cd C:\Windows\System32\drivers\etc
```

<div align="left"><figure><img src="https://2293038076-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQXKoDDsmF8XJ7QoW5Ou5%2Fuploads%2FICJ0kHBN8lvGUY20zMNa%2Fimage.png?alt=media&#x26;token=92f11fc2-9ca1-46b1-9a3c-2829c6069914" alt=""><figcaption></figcaption></figure></div>

5. Open the Windows host file with Notepad: Type the following command to open the Windows host file in Notepad:

```powershell
notepad hosts
```

<div align="left"><figure><img src="https://2293038076-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQXKoDDsmF8XJ7QoW5Ou5%2Fuploads%2FUURNgqjZu4AU4l0iCdYa%2Fimage.png?alt=media&#x26;token=84369a49-256e-4070-8824-00ac259d1c12" alt=""><figcaption><p>Type the following command to open the Windows host file in Notepad</p></figcaption></figure></div>

<div align="left"><figure><img src="https://2293038076-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQXKoDDsmF8XJ7QoW5Ou5%2Fuploads%2FRtYzEvc9CczoYiq6uUyg%2Fimage.png?alt=media&#x26;token=4a415a1d-814b-4f09-89c8-a053dc7a4312" alt=""><figcaption></figcaption></figure></div>

6. Copy the IP address: Open the Homestead.yaml file in a text editor and copy the IP address for your Homestead virtual machine.

<figure><img src="https://2293038076-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQXKoDDsmF8XJ7QoW5Ou5%2Fuploads%2FfxfD41hb3qUP51kzu1LY%2Fimage.png?alt=media&#x26;token=cf184cfe-2539-49d7-89e2-4a279ac7e864" alt=""><figcaption></figcaption></figure>

7. Add the IP address and site names to the Windows host file: In the Notepad window, add a new line at the bottom of the file and paste the IP address you copied earlier. Then, add the site names you want to map to that IP address. For example, if you have a site named "homestead.test" in your Homestead.yaml file, add this line:

```
192.168.56.56 homestead.test
```

<div align="left"><figure><img src="https://2293038076-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQXKoDDsmF8XJ7QoW5Ou5%2Fuploads%2FHET6IXSvfpK2VLkIqTzo%2Fimage.png?alt=media&#x26;token=c6307325-623f-424b-abfe-3101d6d937d1" alt=""><figcaption></figcaption></figure></div>

8. Save the changes and exit Notepad: Save the changes you made to the Windows host file and exit Notepad.

That's it! You have successfully added the IP address and site name to Windows host file. In the next topic, we will launch the Laravel Homestead box using the Vagrant command and create a Laravel project to test the hostname resolution.
