Skip to main content
All CollectionsGeneral
Modify the hosts file on my computer

Modify the hosts file on my computer

Lourdes avatar
Written by Lourdes
Updated over a year ago

How do I modify the hosts file in Windows?

Firstly, we must open Notepad as administrator:

1. Click on the Windows symbol, type TXT or Notepad and right-click on the Notepad app

2. When you click on "run as administrator", an option will appear that says YES or NO, click on YES.

3. Click on the File option

4. Click on Open

5. Now paste the line below on the marked line:

C:\Windows\System32\drivers\etc

At the bottom right, where it says "Text Documents", select "All Files".

6. Choose the hosts file and click on Open

7. In the marked line, add the lines corresponding to the IP of your server and your domain

DO NOT COPY THE YELLOW LINE, IT IS SIMPLY AN EXAMPLE.

8. Save and test on the website.

NOTE: The tests that need to be done are to access the website, check that you can navigate correctly, access the backoffice, etc.

We need a list of errors to be made (if any).

NOTE2: If you get an error accessing a non-secure page, it is normal, the certificate cannot be installed until we install the SSL, you will be given advanced settings and access. With that, the website should be visible.

How do I modify the hosts file in Linux / Mac?

1. Click on the Ubuntu applications container

2. Search for the TERMINAL program

3. Type the following:

sudo nano /etc/hosts

It will ask for the password of the user we are in, enter it and press enter.

4. Add the lines corresponding to the IP of your server and your domain

5. Press Control + O, press enter and Control + X.

This is used to save and exit.

6. Save and test on the website.

IN THE CASE OF MAC

It's all the same, just the way to open the terminal:

Click on the magnifying glass or spotlight, type terminal and just follow the Ubuntu/Mac guide.

NOTE: If you get an error accessing a non-secure page, it is normal, the certificate cannot be installed until we install the SSL, you will be given advanced settings and access. With that, the website should be visible.

How do I know if I am viewing the migrated or old website?

If you have followed all the steps, there should be no problem, but the quick way to check is to access the terminal and ping the domain:

If it returns the IP from the list we have sent you from migrations, it is correct, if it returns another, it is not correct.

Did this answer your question?