Important notice

Please note that this blog is discontinued here. All the posts are also coppied to my new blog at
Important: Due to large amount of comment spam further commenting has been disabled here. If you wish to send me a comment, plase look up the same post on my new blog and leave comment there. Thanks!


Access server different server with certain host name - build a new site while current still exists

The upgrade from Windows SharePoint Services 2.0 to 3.0 gave us in the company the opportunity to reconstruct some of the sites. The issue was that while the new site in WSS3 was in development, the site in the current server would stay active.

With version 2 this wouldn't be a problem. While having the existing we'd create a new SharePoint site with the same host header and add a host header like and work on it using, while the DNS server is still pointing to the old site with At the end you just need to change dns for

The challenge comes with the version 3.0, because it's bound to host headers. Therefore it's best to work with the original host header from beginning. So how to build a website on a new server with a host header while the other one still exists?

One alternative is already described in one of my previous posts.

The second alternative is to set up a DNS server to point to the new IP with the existing domain and use it like primary dns server on the development computer. Not practical - just to sacrifice the whole DNS server for one site.

My friend Miha - who in my oppinion should have a blog for all the great stuff that he advised me untill now - showed me even a better alternative. The third - best - alternative is that you trick your Windows XP or Windows Vista that is on a certain IP - therefore server. Let's say for example that the existing site is on IP And the new server where we want to develop the site is on IP

All we need to do is to edit the hosts file, which is located in c:\windows\system32\drivers\etc folder. At the end add the hostname (domain) and desired IP. - like in the picture below:

In Vista you have to have administrative rights to edit that file. After you've updated the hosts file, flush the DNS resolver cache (Start --> Run --> ipconfig /flushdns) and the the hosts file overrides any dns. Now you can edit the on a new server.

When the site is ready, change the DNS to point to the new site and don't forget to remove the entry in hosts file.

Update: I've had the path to the file wrong. Now it's ok.

No comments: