Can I access my website before the DNS has propagated?


Normally, when working with websites, you have to use the settings provided by the server responsible for the site, or the settings you have configured at your registrar, which in turn are the same settings that everyone else will use. To change the server you work on or view, you need to change the settings for everyone else as well.


However, there are two methods currently available which will allow you to access a site held on our servers either before the DNS settings have been changed (and/or propagated), or you have purchased the domain:


These are useful options, as they allow you to minimize downtime and errors due to the change.



  • Site Preview

  • Hosts Override


Site Preview


This first method is the easiest one to use as it comes with Plesk. However, there are a number of limitations in it's use.


First, if you're using a website which has a hard-coded locations, (i.e. you need to configure it with the URL site can be found on), then the site may fail to work correctly, as you will be accessing it through the Plesk URL, and not your site's normal URL. Sites and programs with these options may try and redirect you back to the website's proper URL which will take you away from the Site Preview function.


Secondly, as you are not accessing the website directory, but via a sub-directory of the Plesk server, absolute URLs will not work. You can only use relative URLs for all images, stylesheets, javascripts, etc.


To use the Site Preview function in Plesk:



  • Log onto Plesk using your username and password.

  • From your list of domains, click on the domain you would like to preview.

  • Click on the Site Preview icon.

  • A new window will now open up which will contain your website. If you do not see a new window, check to make sure that you have any pop-up blockers disabled and/or that the server has been allowed to show pop-ups.


Hosts Override


This second method is the one that will (almost) always work as it overrides the DNS settings for your computer (and only your computer), by fooling it into thinking that our server is actually the host of the domain.


This is done by added an entry to your computer's hosts file, which is just a list of IP addresses, together with one or more domain names that should point to that address. As all computers check their hosts file to see if the domain is listed there first, by added the entry you are hard-coding the IP address you want for the domain and preventing your computer from performing a full DNS lookup for the IP address.


This is a dangerous option, and can potentially damage your computer's ability to perform domain-name to IP address translations (which in essence would render your computer unable to access any site, server, etc. by a hostname). If you are unsure about doing this: Don't. We cannot be held responsible for any damage or errors caused by using this option.

Always remember to backup the file first, before you edit it.


Many anti-virus programs monitor the hosts file as viruses, trojens and mal-/spy-ware use it as a way to redirect traffic and requests to hacked servers and sites. You may need to disable your anti-virus program before you can make the changes required.


There is one limitation with this option - if you are using a proxy server to cache your web traffic (either you have set one up, or your ISP is using a transparent proxy), then the proxy will normally perform it's own domain-name to IP address lookup as well.

As you haven't overridden the settings on the proxy, the proxy will retrieve the correct data and therefore redirect you onto the old site, not to the address you have set on your system.


To edit the hosts file, you will first need to open up a basic text editor, such as Notepad or vIM. (Word Processors, such as WordPro, Microsoft Word or OpenOffice.org Writer may not work, and could try to re-write the file into a format that the system cannot understand).


For Windows systems, Notepad is best (click on Start | Run, enter 'notepad.exe' and click OK), making sure you have 'All Files' selected from the File Type drop-down on the Open File dialog window in order to see the file you want to edit.


With the program running, you'll now need to open the hosts file, which can be found in the following location (depending on what system you are using):



  • C:\Windows\system32\drivers\etc\hosts (under Windows 2000/XP and Windows Vista);

  • C:\WinNT\system32\drivers\etc\hosts (under Windows NT);

  • C:\Windows\hosts (under Windows 9x);

  • /private/etc/hosts (under Mac OS X);

  • /etc/hosts (under any Linux or Unix system).


Towards the bottom of the file, you should normally see the following line:


127.0.0.1        localhost

This is the internal IP address and should not be altered or removed. Under that line, and for each domain (or sub-domain) you wish to access, you need to add a line containing the IP address and the domain name. Your IP address can be found in your 'Account Details' e-mail, under 'Your Account', or by looking just above the Site Preview icon in Plesk.


For example, our website would be set as follows:


85.13.194.50     jabwebsolutions.co.uk
85.13.194.50 www.jabwebsolutions.co.uk

As DNS considers example.com & www.example.com to be two separate addresses, you need to have an entry for each if you want to use them. If you want to just use www.example.com, you don't need to add a line for example.com.


However, just as www.example.com is different from example.com, subdomain.example.com requires it's own entry as well, and for each extra subdomain you want to try out, you need add another line, e.g.


85.13.194.50     jabwebsolutions.co.uk
85.13.194.50 www.jabwebsolutions.co.uk
85.13.194.50 subdomain.jabwebsolutions.co.uk

Once saved, you may need to close down your web browser (to clear it's internal cache), but from then on the hosts file should override your DNS and allow to you work on your site via our servers without having the change any DNS settings first.

  • 169 Users Found This Useful
Was this answer helpful?

Related Articles

Can I access my website before the DNS has propagated?

Normally, when working with websites, you have to use the settings provided by the server...

Why does a change to my DNS take so long to appear?

DNS, or Domain Name Servers, are a group of servers which provide a distributed management of...

How do .htaccess files work in Plesk?

Programs in Linux, such as Apache (the server daemon) and qmail (the mail daemon) are...

What is Hotlinking and how do I prevent it?

If you notice a surge in the traffic coming to your site, it may not be because you are receiving...

What are all the directories for in Plesk?

When you connect to the server via FTP, SFTP or SSH, or enter the File Manager in Plesk, you...