Changing the FQDN of a SharePoint site

​From time to time we get asked what the best way to change the Fully Qualified Domain Name of a SharePoint site.  Typically this is because an internal only name was used, and now there is a desire to expose the site externally over SSL.  Examples would be http://server1, or http://portal.contoso.local being changed to https://portal.contoso.com.

While people often feel they can just change the IIS bindings for their site and update SharePoint's Alternate Access Mappings, and they're done.  The correct process, as described in http://technet.microsoft.com/en-us/library/cc262366(v=office.15).aspx, is a little different.  The basic steps are:

  1. Unextend by removing SharePoint from the IIS Web site
  2. Rextend onto a new IIS Web site with the new URL and port information
  3. Setup any required redirects from the old URL

You do need to be careful though, as you don't want to actually delete the web application.  Here's the steps in more detail:

Unextend the Web Application 

1. Go to Central Administration and select Manage web applications

2. Choose the web application you want to change, and carefully pull the arrow down under Delete in the ribbon (you don't want to delete it)

3. Choose Remove SharePoint From IIS Web Site from the menu

Remove-Ribbon.jpg 

4. Pick the correct zone (it almost all cases you should only have one) and select Yes to Delete IIS web sites

Remove.jpg 

5. Clicking OK will delete the IIS web site only, and not the content database

Rextend the Web Application

1. With the web application still selected, choose Extend from the ribbon

Extend-Ribbon.jpg 

2. Choose the correct zone (ideally the Default zone) and enter the correct port, host header, path, anonymous, and SSL selections

Extend.jpg 

3. Clicking OK will create the new IIS site with the correct bindings, and update SharePoint appropriately.

Note that if you are implementing SSL, you may need to apply your SSL certificate in IIS to complete this process.  Also confirm that the Search Content Source is updated with the new URL, and any customizations or web.config changes are reapplied on the new site.

Setup Redirects

People may have bookmarked links to the original URLs, or links in document or emails.  To avoid them getting a Page can't be displayed error, a redirect should be setup for the previous URL.  This can be done easily in IIS.

  1. Create a new site in IIS 
  2. Go to the HTTP Redirect section
  3. Enter the new URL as the destination
  4. You can either redirect all requests to the same URL (typically the home page), or relative so that the deep links still work
  5. Typically this would be set as a permanent (301) redirect

 HTTP-Redirect.jpg

2 Comments

Rich on 5/12/2015 4:57:00 PM

Finally! A post that details this process! My Web App was created for host named site collections. It was created on the default zone. You say that you then have to extend the web application and choose a new zone. Will I be able to choose the default zone though? I really need this to be on the default zone. Thanks for the article!

Jeremy Ragan on 6/2/2016 1:46:45 PM

It's important to note that when you perform this against your default zone, you will also lose any Farm Solutions that have been deployed to it and will have to go back and re-deploy those solutions.


Leave a Comment

Name  
Email (will not be published)    
Comment  
 
Enter both words, separated by a space.