Not sure what you're looking for?

Book a call

Hello, Redditor! To say thank-you to our friends from Reddit, we have an exclusive offer. Use code REDDIT to get your first month for £1. Applies to monthly plans only.

Gnu Host is now . See our announcement Zume for more details.

You are on our site Visit our site 

How to edit your hosts file to preview a website on Zume

Overview

When you move a website to Zume, there is usually a period where your files are on our server but your domain’s DNS still points to your old host. During this time you cannot see the site on our server simply by typing the domain into your browser, because your browser will follow DNS to the old server.

The hosts file lets you get around this. It is a small text file on your own computer that maps domain names to IP addresses, and your computer checks it before it asks any DNS server. By adding a line that points your domain at your Zume server’s IP address, you can browse and test your site on our server exactly as it will appear when the DNS change goes live. Nobody else is affected; the change applies only to the computer you edit.

This is the recommended way to test a migrated site before updating your nameservers or DNS records, and it works properly with SSL, WordPress and anything else that depends on the real domain name, which temporary preview URLs often do not.

Step 1: Find your server’s IP address

You need the IP address of the Zume server that hosts your account. There are a few places to find it.

From your welcome email

When your hosting account was set up, we sent you a welcome email titled “New Account Information”. This email lists your server’s IP address alongside your cPanel login details.

From cPanel

1. Log in to cPanel. You can do this from the Zume client area by going to **Services**, selecting your hosting package and clicking **Login to cPanel**, or directly at `https://yourdomain.com:2083` if your DNS already points to us.

2. On the right-hand side of the cPanel home page, find the **General Information** panel. If it is collapsed, click the arrow to expand it.

3. Look for **Shared IP Address** or, if your account has its own IP, **Dedicated IP Address**. This is the address you need. It will look something like `185.221.63.10`.

If you cannot find it, open a ticket with our support team and we will tell you straight away.

Step 2: Generate your hosts file line

The line you will add to your hosts file has this format:

185.221.63.10 yourdomain.com www.yourdomain.com

That is the server IP address, followed by your domain with and without the www prefix, separated by spaces or tabs.

You can use the generator below to build this line automatically. Enter your domain and it will look up your account on our nameservers and produce a ready-made line for you to copy.

Enter your domain and we will look up your Zume server and build the line for you.

If the generator reports that your domain is not hosted with us, it usually means your account has not been set up yet, or the domain on the account does not match the one you entered. Check the spelling, or contact support.

Step 3: Edit the hosts file

The location of the hosts file and the way you edit it depends on your operating system. In every case you need administrator rights, because it is a protected system file.

Windows

1. Click **Start** and type `Notepad`.

2. Right-click **Notepad** in the results and choose **Run as administrator**. Accept the security prompt.

3. In Notepad, go to **File > Open** and browse to:

C:\Windows\System32\Drivers\etc\hosts

In the file type dropdown at the bottom right of the Open dialog, change **Text Documents (*.txt)** to **All Files**, otherwise the hosts file will not be visible.

4. Add your generated line on a new line at the bottom of the file, for example:

185.221.63.10 yourdomain.com www.yourdomain.com

5. Save the file with **File > Save**. Do not use Save As, and do not let Notepad add a `.txt` extension.

6. Open Command Prompt and run the following command to clear the local DNS cache:

ipconfig /flushdns

macOS

1. Open **Terminal** (you can find it in Applications > Utilities, or search for it with Spotlight).

2. Run the following command and enter your Mac’s password when prompted:

sudo nano /etc/hosts

3. Use the arrow keys to move to the bottom of the file and add your generated line:

185.221.63.10 yourdomain.com www.yourdomain.com

4. Press **Ctrl+O** then **Enter** to save, and **Ctrl+X** to exit.

5. Clear the DNS cache:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

### Linux

1. Open a terminal and edit the file with your preferred editor, for example:

sudo nano /etc/hosts

2. Add your generated line at the bottom of the file, save and exit.

3. Most distributions apply the change immediately. If yours runs a local DNS cache, clear it with:

sudo resolvectl flush-caches

Step 4: Test your site

Close your browser completely and reopen it, then visit your domain. You should now be looking at your site on the Zume server.

If you want to confirm which server you are reaching, open a terminal or Command Prompt and ping your domain:

ping yourdomain.com

The IP address in the reply should match the one you added to your hosts file.

Step 5: Remove the entry when you are finished

The hosts file overrides public DNS permanently until you remove the line yourself; your computer will never remove it for you. Once you have finished testing and your DNS has been updated to point at Zume, edit the hosts file again using the same steps above, delete the line you added, save the file and flush the DNS cache.

If you forget to remove it, your computer will keep going directly to the IP address you entered, even if the site later moves to a different server, which can be very confusing to troubleshoot months later.

Need a hand?

If you get stuck at any point, open a ticket from the Zume client area and our support team will be happy to help, or to make the change with you over a screen share.

Need help?

Can't find what you're looking for? Our support team is here to help.