Rename SharePoint Host Headers and Change Database Server Name

Published on
-
1 min read

I currently have a SharePoint 2007 demonstration setup on a development environment. The SharePoint 2007 installation was originally setup for a specific client. So the host headers, computer name and farm credentials contained the client name. This all had to be changed. Carrying out another installation of SharePoint was something I did not want to do since I wanted to retain all the dummy data and sites.

You might be thinking: Why don’t I just change the host headers with the new client name? Well that’s because I am a bit OCD and I like everything to be consistent. Tongue out

To rename, carry out the following. But remember to carry out these steps exactly because you might come across the problem I did where I couldn’t get to Central Admin or view my Intranet:

  1. Go to Central Admin > Operations > Alternate Access Mappings.
  2. Change the host headers as required.
  3. If you changed the name of the server carry out the following command:
stsadm -o renameserver -oldservername <oldname> -newservername <newname>
  1. Rename the server to a new server name by going to My Computer > Properties > Computer Name and restart.
  2. After restart you will need to update the farm login credentials since the computer name has been changed from Steps 3 and 4. If you do not update the farm credentials, you will get the dreaded “Cannot connect to database” message when trying to view your Intranet.
stsadm -o updatefarmcredentials -userlogin <domain\user> -password <password>
  1. Change the site names in IIS. This site names will need to reflect the changes you made in Step 1.
  2. Change the host headers in the host file (C:\Windows\System32\drivers\etc\hosts).

Before you go...

If you've found this post helpful, you can buy me a coffee. It's certainly not necessary but much appreciated!

Buy Me A Coffee

Leave A Comment

If you have any questions or suggestions, feel free to leave a comment. I do get inundated with messages regarding my posts via LinkedIn and leaving a comment below is a better place to have an open discussion. Your comment will not only help others, but also myself.