Preview your domain by modifying your hosts file

Do you want to migrate the website to mijn.host but not the domain yet? It is then possible to check in advance if everything is set up correctly on the new server so that your transition goes smoothly. You can do this by temporarily modifying your hosts file.

What is your hosts file?

Your hosts file on your computer gives you the ability to temporarily combine an IP and a domain. This way you can already link your domain to the new IP of your hosting package.

You can do this in different ways, an easy way and a somewhat more complicated one.

The preparation

It is important that your domain is already added to your hosting package, fortunately you can easily do this within our hosting package. Log in to your hosting and click on your hosting package. Then go to domain names and select the add domain name button.

add domain name

Go back to the overview and scroll down to see the IP address of your hosting package.

find IP

 

The easy method

Please note

With SkipDNS you have a great tool to already see a preview of your website, however, this is not a method to check the speed of your hosting package. The speed and performance are both completely separate from this.

If you are using a CDN, we advise you to temporarily disable it.


  1. Using the following method, you can already view your website without the domain actually pointing to our server. 

  1. To do this, go to https://www.skipdns.link and fill in the following fields:

Live URL

The website address you want to view

IP Address

Enter the IP address of your hosting package at mijn.host here.

Next, you can view your website from our hosting using the temporary link.

Please note: this link expires after 1 hour

 

Advanced methods

Via the following methods you will actually modify your hosts file, because this is done via the CLI (Command Line Interface), this method is often considered more difficult.

Modifying hosts file on Mac


  1. Click on Finder at the bottom left and then click on Applications. Here you will find the Utilities folder and the Terminal.
open terminal

  1. Execute the following command:
sudo nano /etc/hosts 

Now enter your MacOS password.

Open hosts file
p>

  1. Fill in the fields below to generate the correct code for you.

IP Address: Domain name:

If you have correctly filled in the fields above, the correct values will appear in the field below.

Copy and paste the following lines:

1.23.456.78domein.nl
1.23.456.78www.domein.nl

Modify hosts file in MacOS with nano

Modify hosts file on Windows

With Windows there are 2 options, you can use Microsoft PowerToys or you can do it manually. We will explain both methods below.

Method 1: Microsoft PowerToys
  1. Go to the Microsoft PowerToys website via https://learn.microsoft.com/en-us/windows/powertoys/.
  2. Click on 'Install PowerToys' and follow the installation steps.
  3. Once PowerToys is installed you can open it. You will then see this screen, click on 'Hosts File Editor'.
  1. Check if the option 'Enable Hosts File Editor' is turned on. Then click on 'Launch Host File Editor'. You will get a pop-up to confirm this, click on 'Yes'.
  1. Another warning pop-up will appear. Accept it by clicking the 'Accept' button.
  1. There will already be some data in this pop-up, you can ignore this. Now click on 'New entry'.
  1. In the first field under 'Address', enter the IP address of your website. You can find this in the mijn.host control panel under your hosting package. In the field under 'Hosts', enter the domain you want to test. Then click on the button at the bottom left to add it.
  1. You can now visit your website with us in any browser via the domain, this only affects the PC where you have set this up. Make sure to turn this off or remove it when your domain has actually been transferred to us to prevent problems later on.
Please note, mayly you need to restart your browser once if it was open during this process.

Method 2: Edit hosts file manually

  1. To edit your hosts file you need a text editor, this can be Notepad for example, but also an IDE like Visual Studio Code. 


  1. Click on File in the text editor and go to the following path:
C:\Windows\System32\drivers\etc\

  1. Next, select the file: hosts

You may need to select the option in the dropdown first so you can see all files in this folder.

  1. Fill in the fields below to generate the correct code for you.

IP Address: Domain name:

If you have filled in the fields above correctly, the correct values will appear in the field below.

Copy and paste them into your hosts file.

1.23.456.78 domein.nl
1.23.456.78 www.domein.nl

Open Notepad

 

 


Still have questions? Get in touch.